{ "info": { "author": "Ao Liu, Jie Gao", "author_email": "ao@aoliu.tech, geographer2008@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Utilities" ], "description": "# easyexception\n\nConveniently submit and print an error, warning, or message from your codes, and specify where the error, warning, or message came from.\n\n### Purpose\nWhen one raise an exception in his/her program, or throws a warning, on the screen it is often unclear where the error/warning/message was initiated. This makes it hard for users of the program to troubleshoot the problem.\n\nIn **easyexception**, this is solved by a simple trick, we combine all kinds of screen messages into one function: \\\n`easyexception(origin, code, severity, msg)`\\\nwhere *severity* can be \"Error\", \"Warning\", or \"Message\"\n\n### Usage\nTo use the `easyexception` function, import it in Python:\n\n from easyexception.exception import easyexception\n\nThe program developer just calls the function to define the above information and deliver the message to the user screen. e.g. if you are developing a calculator program and the user puts in a negative number and then presses \"Square Root\". You want to throw a warning but not to stop the program, you may do:\n\n easyexception(\"mymath.py\", \"calculate_sqrt(n)\", \"Warning\",\n \"Can not give the square root for a negative number\")\n\nThe above assumes `easyexception` is called in function `calculate_sqrt(n)` in file mymath.py.\n\nOr, if the user magically puts some texts in the input bar, and you hate it so much that you would like to raise an Error and stop the program. You may then do:\n\n easyexception(\"get_user_input.py\", \"eval_expr(eq)\", \"Error\",\n \"Texts are not allowed in the input bar!\")\n\nSimilarly, the above assumes `easyexception` is called in function `eval_expr(eq)` in file get_user_input.py.\n\nFinally, `severity=\"Message\"` can be used if you want to notify the user that a calculation is complete, or the user has cleared the memory, etc.\n\n\n### Installation\nInstall easyexception using `pip`, or `pip3`\n\n pip install easyexception\n\n### Repository\n[GitHub page](https://github.com/frankliuao/easyexception)\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://pypi.python.org/pypi/easyexception", "keywords": "Exception,Easy", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "easyexception", "package_url": "https://pypi.org/project/easyexception/", "platform": "", "project_url": "https://pypi.org/project/easyexception/", "project_urls": { "Homepage": "https://pypi.python.org/pypi/easyexception" }, "release_url": "https://pypi.org/project/easyexception/0.0.3/", "requires_dist": null, "requires_python": ">=3.0", "summary": "Easy-to-use custom error/warning/message exceptions.", "version": "0.0.3" }, "last_serial": 5194466, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "4901a82ac00350fbaaaad250c8d0066d", "sha256": "694e428027c2812e0c51cc94802c45ea427a1d9a78f4844d24dcfbae220468a3" }, "downloads": -1, "filename": "easyexception-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "4901a82ac00350fbaaaad250c8d0066d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.0", "size": 3762, "upload_time": "2019-04-26T02:16:39", "url": "https://files.pythonhosted.org/packages/26/72/c3ab4e8567eb7219c9c1d7d315da5cfc5522bca941d6f32f045325b1bd22/easyexception-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f682c4fa0e79c6b024c7ef1467cb5dc9", "sha256": "40de257ec8091ca13b0a43f9cf677a77e38c07092ad87399438bf1ca784ef05f" }, "downloads": -1, "filename": "easyexception-0.0.2.tar.gz", "has_sig": false, "md5_digest": "f682c4fa0e79c6b024c7ef1467cb5dc9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0", "size": 2371, "upload_time": "2019-04-26T02:16:44", "url": "https://files.pythonhosted.org/packages/4b/96/408d941c8dbf754ab81c0efa6fb4fd8ae660567310772d5be8335d6d57f6/easyexception-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "22744b6e8142bc3904b1dbd245464027", "sha256": "9b0ef887c5f1cca412ca0c873054806e451f96cf02d8f28eba5b1cd191ad1ed8" }, "downloads": -1, "filename": "easyexception-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "22744b6e8142bc3904b1dbd245464027", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.0", "size": 3797, "upload_time": "2019-04-26T18:52:57", "url": "https://files.pythonhosted.org/packages/ac/ce/e0f66cd8eaf3c24718f6c22e009b122c39a8b0e0555c7e2387958549910d/easyexception-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9318201e93a87291095110bf5cb03d10", "sha256": "00018ffc1425f92bb75add2048b6629af8d8dd8e8d2697d46c8e25a3c876651b" }, "downloads": -1, "filename": "easyexception-0.0.3.tar.gz", "has_sig": false, "md5_digest": "9318201e93a87291095110bf5cb03d10", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0", "size": 2409, "upload_time": "2019-04-26T18:53:00", "url": "https://files.pythonhosted.org/packages/34/4b/e9c091006003fbae7d8179adef604aea2226b00de4b15701b495f4e493ce/easyexception-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "22744b6e8142bc3904b1dbd245464027", "sha256": "9b0ef887c5f1cca412ca0c873054806e451f96cf02d8f28eba5b1cd191ad1ed8" }, "downloads": -1, "filename": "easyexception-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "22744b6e8142bc3904b1dbd245464027", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.0", "size": 3797, "upload_time": "2019-04-26T18:52:57", "url": "https://files.pythonhosted.org/packages/ac/ce/e0f66cd8eaf3c24718f6c22e009b122c39a8b0e0555c7e2387958549910d/easyexception-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9318201e93a87291095110bf5cb03d10", "sha256": "00018ffc1425f92bb75add2048b6629af8d8dd8e8d2697d46c8e25a3c876651b" }, "downloads": -1, "filename": "easyexception-0.0.3.tar.gz", "has_sig": false, "md5_digest": "9318201e93a87291095110bf5cb03d10", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0", "size": 2409, "upload_time": "2019-04-26T18:53:00", "url": "https://files.pythonhosted.org/packages/34/4b/e9c091006003fbae7d8179adef604aea2226b00de4b15701b495f4e493ce/easyexception-0.0.3.tar.gz" } ] }