{ "info": { "author": "Daniel Lupu", "author_email": "dflupu@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# aioeachlimit\n\nApply an async function to each item in an array or queue with limited concurrency\n\n## Install\n\n`pip install aioeachlimit`\n\n## Usage\n\n```\nasync def f(item):\n asyncio.sleep(3)\n\treturn item * 2\n\nitems = [1, 2, 3, 4]\n\nasync for result in aioeachlimit(items, f, concurrency_limit=2):\n\tprint(result) # Prints 2 4 6 8 in random order\n```\n\nIf you don't need to return anything:\n\n```\nawait aioeachlimit(items, f, concurrency_limit=2, discard_results=True)\n```\n\nIf `items` is an `asyncio.Queue` then aioeachlimit will read from it indefinitely.\n\n## Tests\n\n`pytest .`", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/dflupu/aioeachlimit", "keywords": "asyncio aio each limit concurrency generator synchronization", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "aioeachlimit", "package_url": "https://pypi.org/project/aioeachlimit/", "platform": "", "project_url": "https://pypi.org/project/aioeachlimit/", "project_urls": { "Homepage": "http://github.com/dflupu/aioeachlimit" }, "release_url": "https://pypi.org/project/aioeachlimit/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "Apply an async function to each item in an array or queue with limited concurrency", "version": "0.1.0" }, "last_serial": 4802193, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f527cbf31710fe06d780a303919880d7", "sha256": "5cace907ee476f0cb579d4d8a5a29034f472cc4c8b98604f8664b63368b9a0ca" }, "downloads": -1, "filename": "aioeachlimit-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f527cbf31710fe06d780a303919880d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2379, "upload_time": "2019-02-10T13:55:47", "url": "https://files.pythonhosted.org/packages/7c/e2/10765b5f87959d19548c06c752026fdd5de35ce2086627dd16a53b5a1099/aioeachlimit-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f527cbf31710fe06d780a303919880d7", "sha256": "5cace907ee476f0cb579d4d8a5a29034f472cc4c8b98604f8664b63368b9a0ca" }, "downloads": -1, "filename": "aioeachlimit-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f527cbf31710fe06d780a303919880d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2379, "upload_time": "2019-02-10T13:55:47", "url": "https://files.pythonhosted.org/packages/7c/e2/10765b5f87959d19548c06c752026fdd5de35ce2086627dd16a53b5a1099/aioeachlimit-0.1.0.tar.gz" } ] }