{ "info": { "author": "Ryan Northey", "author_email": "ryan@3ca.org.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Detailed documentation\n**********************\n\n\naio.core\n========\n\nCore definitions and utilities for the aio_ asyncio framework\n\n.. _aio: https://github.com/phlax/aio\n\n\nInstallation\n------------\n\nInstall with:\n\n.. code:: bash\n\n\t pip install aio.core\n\n\naio.core.exceptions usage\n=========================\n\n\nMissingConfiguration\n--------------------\n\n>>> from configparser import ConfigParser\n>>> from aio.core.exceptions import MissingConfiguration\n\n>>> def get_configuration(conf, section, option):\n... try:\n... conf[section][option]\n... except KeyError:\n... raise MissingConfiguration(\n... \"Configuration option is missing: %s:%s\" % (\n... section, option))\n \n>>> try:\n... get_configuration(ConfigParser(), \"foo\", \"bar\")\n... except MissingConfiguration as e:\n... print(e)\nConfiguration option is missing: foo:bar\n\n\nBadConfiguration\n-------------------- \n \n>>> from aio.core.exceptions import BadConfiguration \n\n>>> def get_configuration(conf, section, option, option_type):\n... option_value = conf[section][option]\n... try:\n... option_type(option_value)\n... except ValueError:\n... raise BadConfiguration(\n... 'Configuration is bad: %s:%s expected type %s, but got \"%s\"' % (\n... section, option, option_type.__name__, option_value))\n\n>>> config = ConfigParser()\n>>> config.read_dict({\"foo\": {\"bar\": \"baz\"}})\n\n>>> try:\n... get_configuration(config, \"foo\", \"bar\", int)\n... except BadConfiguration as e:\n... print(e)\nConfiguration is bad: foo:bar expected type int, but got \"baz\"\n\n\nCommandError\n------------\n \n>>> from aio.core.exceptions import CommandError \n\n>>> def run_command(command):\n... options = [\"egg\", \"chips\"]\n... if command not in options:\n... raise CommandError(\"This command cannot be called with %s\" % command)\n\n\n>>> try:\n... run_command(\"spam\")\n... except CommandError as e:\n... print(e)\nThis command cannot be called with spam", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/phlax/aio.core", "keywords": "", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "aio.core", "package_url": "https://pypi.org/project/aio.core/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/aio.core/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/phlax/aio.core" }, "release_url": "https://pypi.org/project/aio.core/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Aio core utils", "version": "0.1.0" }, "last_serial": 1560691, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "d03c61f0a9aa2044d5ad6938d3e12561", "sha256": "b79448844ac66282bd60f89446165daa075c9eae8b670ab9c506de2796af635c" }, "downloads": -1, "filename": "aio.core-0.0.1.tar.gz", "has_sig": false, "md5_digest": "d03c61f0a9aa2044d5ad6938d3e12561", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1852, "upload_time": "2015-05-17T21:33:02", "url": "https://files.pythonhosted.org/packages/e4/be/790286b237f851814e0e739e81ee587de69354fac18153da2b45f2671d8a/aio.core-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "3fe31e27b05edc6b3c5be4c15083a683", "sha256": "2fb97db394ba990286ec8a70efe7e6e328562118729e420d67087a802dc5d414" }, "downloads": -1, "filename": "aio.core-0.0.2.tar.gz", "has_sig": false, "md5_digest": "3fe31e27b05edc6b3c5be4c15083a683", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1864, "upload_time": "2015-05-23T01:07:57", "url": "https://files.pythonhosted.org/packages/07/b9/f272bcfc8a15f288975ba8bd32e7217a0f6d03b45d95507facc74b7dbd05/aio.core-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "daee7a2f6b4713e41f9f2f3b71218d23", "sha256": "11dcaeab8cee64f229488edb59cf93259a3e0cae7276fe778ae7880017863979" }, "downloads": -1, "filename": "aio.core-0.0.3.tar.gz", "has_sig": false, "md5_digest": "daee7a2f6b4713e41f9f2f3b71218d23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2338, "upload_time": "2015-05-23T14:57:05", "url": "https://files.pythonhosted.org/packages/e9/0c/45c78240a979f146ba5d41f6da6b74ba053f4407371ec014a09b578e1886/aio.core-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "36e43c43184fb7f02fbf9aa567714262", "sha256": "79fadde1f35cfed338a754085251da13f1f37128c0007b9a2fc25ede34be6ff8" }, "downloads": -1, "filename": "aio.core-0.0.4.tar.gz", "has_sig": false, "md5_digest": "36e43c43184fb7f02fbf9aa567714262", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2539, "upload_time": "2015-05-23T21:38:33", "url": "https://files.pythonhosted.org/packages/96/6a/2488b70b3132b68129ef85f68e7f705f421658006beaaabbd8eeb9d337cb/aio.core-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "dcfe24b4a98baa46fbcf3f6250cfc8a1", "sha256": "3d07104a4ab03c30f3afa69ce47e4f6a48f4fe536fa227336d6dcff60af584a8" }, "downloads": -1, "filename": "aio.core-0.0.5.tar.gz", "has_sig": false, "md5_digest": "dcfe24b4a98baa46fbcf3f6250cfc8a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2544, "upload_time": "2015-05-23T22:40:08", "url": "https://files.pythonhosted.org/packages/77/e3/cea312278cfb7b309bd2e1565f3cad203415cee7f8cefe3d0ace0f52f8cc/aio.core-0.0.5.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "14509139506bace4e62550ad26d197b6", "sha256": "e2e1d5766ad09b894894b6bac8ddc5237a5bc7f00e9b21b00611944915227e10" }, "downloads": -1, "filename": "aio.core-0.1.0.tar.gz", "has_sig": false, "md5_digest": "14509139506bace4e62550ad26d197b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2708, "upload_time": "2015-05-24T21:38:11", "url": "https://files.pythonhosted.org/packages/c7/a1/51a422c3905f2443ac214ee118c9294ab0305036056a43af0ee841b56b9c/aio.core-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "14509139506bace4e62550ad26d197b6", "sha256": "e2e1d5766ad09b894894b6bac8ddc5237a5bc7f00e9b21b00611944915227e10" }, "downloads": -1, "filename": "aio.core-0.1.0.tar.gz", "has_sig": false, "md5_digest": "14509139506bace4e62550ad26d197b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2708, "upload_time": "2015-05-24T21:38:11", "url": "https://files.pythonhosted.org/packages/c7/a1/51a422c3905f2443ac214ee118c9294ab0305036056a43af0ee841b56b9c/aio.core-0.1.0.tar.gz" } ] }