{ "info": { "author": "Felix Meyer-Wolters", "author_email": "felix@meyerwolters.de", "bugtrack_url": null, "classifiers": [], "description": "\n# aioshim\n\n\n## Description\n\nThe main purpose of this lib is to provide *asyncio* compatible versions of the functions in the standard library. E.g. `itertools.chain()` doesn't work with `async_generators`, so there is `aioshim.itertools.chain()` to fill the gap. Etc.\n\nI'm sure the stdlib will catch up with this sooner or later. This lib is for those who need a shim as soon as possible. \n\nThis could be a central repo for all such *asyncio* related shims.\n\nIf there is interest, this repo could be maintained by a github *aioshim* org or something.\n\n\n## Requirements\n\naioshim requires Python `>= 3.6`\n\n\n## Install\n\n pip install aioshim\n\nor\n\n pipenv install aioshim\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) formatter.\n\n\n
\n\n# Library Documentation\n\n* [builtins](#builtins)\n * [aenumerate](#aenumerate)\n* [itertools](#itertools)\n * [chain](#itertoolschainiterables)\n * [chain_from_iterable](#itertoolschain_from_iterableiterable)\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: [itertools.chain](https://docs.python.org/3.6/library/itertools.html#itertools.chain)\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: [itertools.chain.from_iterable](https://docs.python.org/3.6/library/itertools.html#itertools.chain.from_iterable)\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)tertoolschain_from_iterableiterable\n```\n\n\n## More items to come\n\nPull requests appreciated!\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/feluxe/aioshim/tarball/0.0.3", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/feluxe/aioshim", "keywords": "", "license": "unlicensed", "maintainer": "", "maintainer_email": "", "name": "aioshim", "package_url": "https://pypi.org/project/aioshim/", "platform": "", "project_url": "https://pypi.org/project/aioshim/", "project_urls": { "Download": "https://github.com/feluxe/aioshim/tarball/0.0.3", "Homepage": "https://github.com/feluxe/aioshim" }, "release_url": "https://pypi.org/project/aioshim/0.0.3/", "requires_dist": null, "requires_python": "", "summary": "", "version": "0.0.3" }, "last_serial": 3715361, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "6a8dcd9c5ecaae2d7311d7235ccfe3a4", "sha256": "215cf1053b8c8eb7cdefbf9d4a621df21d21c41b5edef497be7073ae7ba5ff59" }, "downloads": -1, "filename": "aioshim-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "6a8dcd9c5ecaae2d7311d7235ccfe3a4", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 4381, "upload_time": "2018-03-28T21:46:09", "url": "https://files.pythonhosted.org/packages/c6/30/06803b723936cd3326b381e6fda6330ca422327ab612d909a8c60ec7f9f1/aioshim-0.0.2-py3-none-any.whl" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "6d611267952200df5e1f6b213795e551", "sha256": "c46cf571bfbccef1f39cdd53d6e42c417839511e151aa89fbfd61a3e5dcd3ab0" }, "downloads": -1, "filename": "aioshim-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "6d611267952200df5e1f6b213795e551", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 4619, "upload_time": "2018-03-28T22:18:17", "url": "https://files.pythonhosted.org/packages/58/18/3155422a6f9ea3f8c0d0898f247e7b6c2e5f114987c8fa53f60b98582d3c/aioshim-0.0.3-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6d611267952200df5e1f6b213795e551", "sha256": "c46cf571bfbccef1f39cdd53d6e42c417839511e151aa89fbfd61a3e5dcd3ab0" }, "downloads": -1, "filename": "aioshim-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "6d611267952200df5e1f6b213795e551", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 4619, "upload_time": "2018-03-28T22:18:17", "url": "https://files.pythonhosted.org/packages/58/18/3155422a6f9ea3f8c0d0898f247e7b6c2e5f114987c8fa53f60b98582d3c/aioshim-0.0.3-py3-none-any.whl" } ] }