{ "info": { "author": "Felix Meyer-Wolters", "author_email": "felix@meyerwolters.de", "bugtrack_url": null, "classifiers": [], "description": "\n# aiolib\n\n\n## Description\n\nThe main purpose of this lib is to provide *asyncio* compatbile alternatives for items of the standard library that aren't asyncio compatible. E.g. `itertools.chain.from_iterable()` doesn't work with `async_generators`, etc.\n\nI hope/guess the stdlib will catch up with this sooner or later. This lib is for those who need a shim as soon as possible.\n\nIf you find something in the standard lib that doesn't work or play well with asyncio, please go ahead and add your replecement/wrapper!\n\n\n## Requirements\n\naiolib requires Python `>= 3.6`\n\n\n## Install\n\n pip install aiolib\n\nor\n\n pipenv install aiolib\n\n\n## Library Documentation\n\n\n### builtins\n\n#### `aenumerate`\n\nAsync version of: [enumerate](https://docs.python.org/3.6/library/functions.html#enumerate)\n\nExample:\n\n```python\n\nasync for i in aenumerate(chain(a_gen, range(10))):\n print(i)\n\n```\n\n### itertools\n\n\n#### `itertools.chain(*iterables)`\n\nAsync version of: [chain](https://docs.python.org/3.6/library/itertools.html#itertools.chain) in the stdlib.\n\nThis function can handle `AsyncGeneratorType`.\n\nExample:\n\n```python\n# Use with async_generator:\nasync for i in chain(my_async_gen1, my_async_gen2):\n print(i)\n\n# Allows for mixing normal generators with async generators:\nasync for i in chain(my_async_gen, range(10)):\n print(i)\n```\n\n\n#### `itertools.chain_from_iterable(iterable)`\n\nAsync version of: [from_iterable](https://docs.python.org/3.6/library/itertools.html#itertools.chain.from_iterable) in the stdlib.\n\nThis function can handle `AsyncGeneratorType`.\n\nExample:\n\n```python\n# Use with async_generator:\nasync for i in chain_from_iterable(my_async_generator):\n print(i)\n\n# Works with normal items as well:\nasync for i in chain_from_iterable([range(10)]):\n print(i)\n```\n\n\n### More items to come\n\nPull requests appreciated!\n\n\n\n## Development\n\nJust clone the repo and run:\n\n pipenv install --dev\n\nThis project uses [yapf](https://github.com/google/yapf), but I don't really care how you format your pull requests. It would be auto-formatted later.\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/feluxe/aiolib/tarball/0.0.2", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/feluxe/aiolib", "keywords": "", "license": "unlicensed", "maintainer": "", "maintainer_email": "", "name": "aiolib", "package_url": "https://pypi.org/project/aiolib/", "platform": "", "project_url": "https://pypi.org/project/aiolib/", "project_urls": { "Download": "https://github.com/feluxe/aiolib/tarball/0.0.2", "Homepage": "https://github.com/feluxe/aiolib" }, "release_url": "https://pypi.org/project/aiolib/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "", "version": "0.0.2" }, "last_serial": 3715238, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "fd97365c1483ac51fb17beb0da840c96", "sha256": "8e08c323d701ac6616fb956521fc613715cb2f0afe7be8274602b050f85bb52a" }, "downloads": -1, "filename": "aiolib-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "fd97365c1483ac51fb17beb0da840c96", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 4577, "upload_time": "2018-03-28T21:16:41", "url": "https://files.pythonhosted.org/packages/5c/2b/d140a04da00b9f8722814b4caf37ecda819450621ef5349ec633d912b215/aiolib-0.0.1-py3-none-any.whl" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "9e80781c4e162b65ec358254e98d4fe1", "sha256": "d3fb7e1fafd952c022e47663ff45e93a86627996260f4bb677633dcaf0fc8749" }, "downloads": -1, "filename": "aiolib-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "9e80781c4e162b65ec358254e98d4fe1", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 4580, "upload_time": "2018-03-28T21:22:37", "url": "https://files.pythonhosted.org/packages/00/65/1f3b99a04652fda8178067070df0e56d4d21a47639d8e884b4ca9fc47703/aiolib-0.0.2-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9e80781c4e162b65ec358254e98d4fe1", "sha256": "d3fb7e1fafd952c022e47663ff45e93a86627996260f4bb677633dcaf0fc8749" }, "downloads": -1, "filename": "aiolib-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "9e80781c4e162b65ec358254e98d4fe1", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 4580, "upload_time": "2018-03-28T21:22:37", "url": "https://files.pythonhosted.org/packages/00/65/1f3b99a04652fda8178067070df0e56d4d21a47639d8e884b4ca9fc47703/aiolib-0.0.2-py3-none-any.whl" } ] }