{ "info": { "author": "Eike Tim Jesinghaus", "author_email": "eike@naturalnet.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "exguard - Guard code against exceptions, e.g. for running untrusted module code in a framework\n==============================================================================================\n\nDescription\n-----------\n\nexgurd provides a decorator to guard a function or method against\nexceptions. This is useful in situations where untrusted code is\nexecuted, e.g. when executing a third-party module in a framework.\n\nIn comparison to the `suppress` context manager from Python 3, exguard\nprovides more means to control exception handling:\n\n- filter on modules and namespaces to define which exceptions to catch\n and leave exceptions in other code untouched\n- execute a callback function once an exception was caught\n- execute a callback function in the `finally` block\n\nFor example, an API method in a web application that calls through to\ncode in third-party modules can be guarded against exceptions in this\nmodules only, while having exceptions in the framework itself be raised\nverbatim::\n\n from exguard import guard, traceback_str\n\n def throw_to_client(exception, module):\n tb = traceback_str(exception)\n\n # Do something to pass a traceback to the browser, disable the plugin,\u2026\n pass\n\n # All third-party modules are under one namespace\n @guard(modules=[\"myframework.plugins\"], submodules=True, fullstack=True, cb_except=throw_to_client)\n def call_plugin_api():\n # An exception inside this will be caught\n myframework.plugins.evil.crash()\n\n # This will still raise an exception like normal\n x = 17 / 0\n\n\nAuthors\n-------\n\nexguard has been started as a part of `Veripeditus\n`_, mainly by\nEike Tim Jesinghaus .\n\nLicence and copyright\n---------------------\n\n::\n\n exguard - Guard code against exceptions, e.g. for running untrusted module code in a framework\n Copyright (C) 2017 Eike Tim Jesinghaus \n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\nChangelog\n---------\n\n0.2.1\n~~~~~\n\n- Guard against or other non-module frames.\n\n0.2\n~~~\n\n- Add utility function to get full traceback as string.\n- Re-licence under MIT.\n- Minor documentation updates.\n\n0.1\n~~~\n\n- First release.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://edugit.org/Veripeditus/exguard", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "exguard", "package_url": "https://pypi.org/project/exguard/", "platform": "", "project_url": "https://pypi.org/project/exguard/", "project_urls": { "Homepage": "https://edugit.org/Veripeditus/exguard" }, "release_url": "https://pypi.org/project/exguard/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "", "version": "0.2.1" }, "last_serial": 3137736, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "9325911768f4715a36d4a62372941ee8", "sha256": "5fda31c99ffbab50ffc29463387ee9882e601114577244b0dff66a7c2d98cfe6" }, "downloads": -1, "filename": "exguard-0.1-py3-none-any.whl", "has_sig": true, "md5_digest": "9325911768f4715a36d4a62372941ee8", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 5923, "upload_time": "2017-07-29T21:44:50", "url": "https://files.pythonhosted.org/packages/6c/00/e93cdb80ea168eb81b248866c86b9fcaead7180c8333d81a9dcad28b4dc5/exguard-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "65622c04d9ccc235852cf5a58a6dce5f", "sha256": "55336f3b3d3c73689654319d7f8dd4ddf2284eccb97cd3862b473232b74400f9" }, "downloads": -1, "filename": "exguard-0.1.tar.gz", "has_sig": true, "md5_digest": "65622c04d9ccc235852cf5a58a6dce5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3487, "upload_time": "2017-07-29T21:44:48", "url": "https://files.pythonhosted.org/packages/51/08/e33f9894a715383f8e174b2882bc3ab9eeb0c2e0505316648b62fd65a9e0/exguard-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "81a7e314f4d4a0d0f123b5e1dfa3125b", "sha256": "6ce5e783bb5b885419b8b9e694fc247740e7f4591d5203967784fc3d62e34d9d" }, "downloads": -1, "filename": "exguard-0.2-py3-none-any.whl", "has_sig": true, "md5_digest": "81a7e314f4d4a0d0f123b5e1dfa3125b", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 6903, "upload_time": "2017-07-30T09:11:38", "url": "https://files.pythonhosted.org/packages/93/3d/720d8478dc992ad87ba2e099cc5828238dbf27c8ea48482dadf054beaa6e/exguard-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dcce1b597a43e7d20237ed55e6b32b0c", "sha256": "76673ef710463679c1283f7d8a9f83fe71c6ffc628d3c1ce2ed73f266ea7a682" }, "downloads": -1, "filename": "exguard-0.2.tar.gz", "has_sig": true, "md5_digest": "dcce1b597a43e7d20237ed55e6b32b0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4001, "upload_time": "2017-07-30T09:11:35", "url": "https://files.pythonhosted.org/packages/b0/86/e16ab450ec346c01e54e9267a0369544dcdfd0c1777e024f9f5c23fba054/exguard-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "a6cabf17679ed8542d4bcdf2ffd67738", "sha256": "b955add660111f120ceb0e7b113539d82e5a9823d28b657929efc98a668971b5" }, "downloads": -1, "filename": "exguard-0.2.1-py3-none-any.whl", "has_sig": true, "md5_digest": "a6cabf17679ed8542d4bcdf2ffd67738", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7023, "upload_time": "2017-08-31T14:40:24", "url": "https://files.pythonhosted.org/packages/f1/0a/11208767200ebe041a41770b76d0b0d929717c88349552cb72d868096113/exguard-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c18aec2442931e4f2cf660dfde1dc8f2", "sha256": "e4b06870a9791fb4a8d7f84af2aef54eb3383251d1ef79e0a019ebe277d2c015" }, "downloads": -1, "filename": "exguard-0.2.1.tar.gz", "has_sig": true, "md5_digest": "c18aec2442931e4f2cf660dfde1dc8f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4075, "upload_time": "2017-08-31T14:40:21", "url": "https://files.pythonhosted.org/packages/45/7f/777821ee51265f83e157f9f0aca4792024c645811ee70142b48f47435e43/exguard-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a6cabf17679ed8542d4bcdf2ffd67738", "sha256": "b955add660111f120ceb0e7b113539d82e5a9823d28b657929efc98a668971b5" }, "downloads": -1, "filename": "exguard-0.2.1-py3-none-any.whl", "has_sig": true, "md5_digest": "a6cabf17679ed8542d4bcdf2ffd67738", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7023, "upload_time": "2017-08-31T14:40:24", "url": "https://files.pythonhosted.org/packages/f1/0a/11208767200ebe041a41770b76d0b0d929717c88349552cb72d868096113/exguard-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c18aec2442931e4f2cf660dfde1dc8f2", "sha256": "e4b06870a9791fb4a8d7f84af2aef54eb3383251d1ef79e0a019ebe277d2c015" }, "downloads": -1, "filename": "exguard-0.2.1.tar.gz", "has_sig": true, "md5_digest": "c18aec2442931e4f2cf660dfde1dc8f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4075, "upload_time": "2017-08-31T14:40:21", "url": "https://files.pythonhosted.org/packages/45/7f/777821ee51265f83e157f9f0aca4792024c645811ee70142b48f47435e43/exguard-0.2.1.tar.gz" } ] }