{ "info": { "author": "Julien Palard", "author_email": "julien@palard.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License" ], "description": "AsyncZip\n========\n\n`AsyncZip` is a simple `zip` like function working with asynchronous\niterables. It look, in many aspects, like `asyncio.wait`.\n\nUsage\n-----\n\nGiven *n* asynchronous iterables, `AsyncZip(*aiterables)` gives a new\nasynchronous iterable iterating over all of them. Like `asyncio.wait`,\nit's possible to wait for any iterable to yield something using the\noption `FIRST_COMPLETED`, or to wait for all of them using the option\n`ALL_COMPLETED`.\n\nclass AsyncZip\n--------------\n\n.. code:: python\n\n def __init__(self, *asynchronous_iterables, loop=None, yield_when=FIRST_COMPLETED):\n\n- asynchronous_iterables: A collection of asynchronous iterables\n- loop: Optional named parameter, to give an specific event loop\n- yield_when: Like `return_when` from `asyncio.wait`,\n `FIRST_COMPLETED` or `ALL_COMPLETED`.\n\nFIRST_COMPLETED, ALL_COMPLETED\n------------------------------\n\nThe two values `yield_when` can take, `FIRST_COMPLETED` and\n`ALL_COMPLETED` tell, like for `asyncio.wait`, when `AsyncZip` should\nyield. Defaults to FIRST_COMPLETED.\n\n- FIRST_COMPLETED\n\nLike `select`, where `AsyncZip` yields each time any iterable yields,\nas soon as possible.\n\n- ALL_COMPLETED\n\nIt's the classical `zip` mode, where `AsyncZip` waits for a value for\neach iterator before yielding them all in a single loop.\n\nExample usage\n-------------\n\n.. code:: python\n\n import asyncio\n from asynczip import AsyncZip\n\n class DummyAsyncIterable:\n def __init__(self, items):\n self.items = items\n\n async def __aiter__(self):\n return self\n\n async def __anext__(self):\n try:\n return self.items.pop(0)\n except IndexError:\n raise StopAsyncIteration\n\n async def test():\n async for items in AsyncZip(DummyAsyncIterable(list(\"foo\")),\n DummyAsyncIterable(list(\"bar\"))):\n print(items)\n\n asyncio.get_event_loop().run_until_complete(test())\n\nGives:\n\n.. code::\n\n [ result='f'>, result='b'>]\n [ result='o'>, result='a'>]\n [ result='o'>, result='r'>]", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/julienpalard/AsyncZip/tarball/1.0.7", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/JulienPalard/asynczip", "keywords": "asyncio,zip,select,async for,async", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "asynczip", "package_url": "https://pypi.org/project/asynczip/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/asynczip/", "project_urls": { "Download": "https://github.com/julienpalard/AsyncZip/tarball/1.0.7", "Homepage": "https://github.com/JulienPalard/asynczip" }, "release_url": "https://pypi.org/project/asynczip/1.0.7/", "requires_dist": null, "requires_python": null, "summary": "Asynchronous `zip` like aggregator for `async for`", "version": "1.0.7" }, "last_serial": 2074249, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "2251c9e59951a057f8429b0fba6669e8", "sha256": "56756abd2c960fede10da5a9a0390bb67940b27b3ccf0678719a04f877473f5d" }, "downloads": -1, "filename": "asynczip-1.0.tar.gz", "has_sig": false, "md5_digest": "2251c9e59951a057f8429b0fba6669e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1608, "upload_time": "2016-04-20T13:36:32", "url": "https://files.pythonhosted.org/packages/f0/1e/9b745bcf9bf6ba912a727bb316b3617b468ca62de8eaea9f962142a0aba8/asynczip-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "89fef326096fa25ca52907255ca0181a", "sha256": "e13ae5b89d379229939184d871fbfacafc61c8c317d8459fc07dfd2a94a52c82" }, "downloads": -1, "filename": "asynczip-1.0.1.tar.gz", "has_sig": false, "md5_digest": "89fef326096fa25ca52907255ca0181a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1637, "upload_time": "2016-04-20T13:51:09", "url": "https://files.pythonhosted.org/packages/e6/49/b88deb124cefc86da6c848a31bfb3f1f4538c1c988dd91178e5af68c253d/asynczip-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "cc6d192b1bcb2444d26a89c86d11a66b", "sha256": "8b17d4ee4b04eb243973da1eb5eeb456be453134322fbac6d17588e208fe3f9b" }, "downloads": -1, "filename": "asynczip-1.0.2.tar.gz", "has_sig": false, "md5_digest": "cc6d192b1bcb2444d26a89c86d11a66b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1590, "upload_time": "2016-04-20T14:01:04", "url": "https://files.pythonhosted.org/packages/4a/b3/60704237ba663021ac95b3936f68df5074b358d6e1afc35e44607d306f08/asynczip-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "2dc7fa4c121f9fbe247d3bc70e128ad5", "sha256": "70fb3c9029c96ec3576d44d0223e9518f3eb0032aea878ae254aaf2d96e556d8" }, "downloads": -1, "filename": "asynczip-1.0.3.tar.gz", "has_sig": false, "md5_digest": "2dc7fa4c121f9fbe247d3bc70e128ad5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1590, "upload_time": "2016-04-20T14:08:06", "url": "https://files.pythonhosted.org/packages/85/4e/ceb25b28804117d56bedd28b8173f8ae0e846e686a49da591fdbb6e401ed/asynczip-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "4e8bdda79a409166474dd6c8f20fc822", "sha256": "716f62167d0d24def106e9a17797f812295952d173a0b6f8842ae71f920e4437" }, "downloads": -1, "filename": "asynczip-1.0.4.tar.gz", "has_sig": false, "md5_digest": "4e8bdda79a409166474dd6c8f20fc822", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1832, "upload_time": "2016-04-20T14:14:40", "url": "https://files.pythonhosted.org/packages/13/a8/177806c2df0591306b47a00235540813672e14d8991b35110cdf0555b1c7/asynczip-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "064028e323ef8f53ee6cd54ab8d8a163", "sha256": "29138387e483eb57facdea92597846d933ca7712ed9a0d8c5e69cf29a1fb176a" }, "downloads": -1, "filename": "asynczip-1.0.5.tar.gz", "has_sig": false, "md5_digest": "064028e323ef8f53ee6cd54ab8d8a163", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3264, "upload_time": "2016-04-20T14:18:02", "url": "https://files.pythonhosted.org/packages/cd/63/0b685024ef768e36e2efe88d03e0a64856bc8ed9ba1d8771dcfd365c5123/asynczip-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "52bf439401e15300fdcd6f8b585b7d95", "sha256": "17a7200d539313a7d2c206b29b9ebada6ee7567db824f6a1c485f749ef36531d" }, "downloads": -1, "filename": "asynczip-1.0.6.tar.gz", "has_sig": false, "md5_digest": "52bf439401e15300fdcd6f8b585b7d95", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3139, "upload_time": "2016-04-20T14:25:52", "url": "https://files.pythonhosted.org/packages/d6/e3/27edc6582f400427f314be98daa59a1357df5d5d1fbfec08549be7bd1157/asynczip-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "070863ec67dcebb4851ef5cf515e2665", "sha256": "eea2b2375256dce6da2457d79212deb1c7861146238853be6c5c15aa5be8ebfc" }, "downloads": -1, "filename": "asynczip-1.0.7.tar.gz", "has_sig": false, "md5_digest": "070863ec67dcebb4851ef5cf515e2665", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3362, "upload_time": "2016-04-20T14:37:23", "url": "https://files.pythonhosted.org/packages/86/7f/47f404eae0286669a02bd929c220bca6fadf63d38672c935075885b2026a/asynczip-1.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "070863ec67dcebb4851ef5cf515e2665", "sha256": "eea2b2375256dce6da2457d79212deb1c7861146238853be6c5c15aa5be8ebfc" }, "downloads": -1, "filename": "asynczip-1.0.7.tar.gz", "has_sig": false, "md5_digest": "070863ec67dcebb4851ef5cf515e2665", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3362, "upload_time": "2016-04-20T14:37:23", "url": "https://files.pythonhosted.org/packages/86/7f/47f404eae0286669a02bd929c220bca6fadf63d38672c935075885b2026a/asynczip-1.0.7.tar.gz" } ] }