windmolen


Namewindmolen JSON
Version 0.0.1 PyPI version JSON
download
home_page
SummaryTreat multiple async iterators as a single async iterator.
upload_time2023-06-14 19:35:27
maintainer
docs_urlNone
author
requires_python>=3.7
licenseMIT License
keywords async iterator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Windmolen

Treat multiple asynchronous iterators like they are a single asynchronous iterator.

**Example:**

```python
import asyncio
from windmolen import FanIn


async def async_iterator_1():
    for i in range(1, 5):
        yield i
        await asyncio.sleep(0.5)


async def async_iterator_2():
    for j in range(5, 9):
        yield j
        await asyncio.sleep(1)


async def main():
    async with FanIn(async_iterator_1(), async_iterator_2()) as async_iterators:
        async for item in async_iterators:
            print(item)


if __name__ == "__main__":
    asyncio.run(main())
```

## Install

```shell
pip install windmolen
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "windmolen",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "async,iterator",
    "author": "",
    "author_email": "Austin Raney <aaraney@protonmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/08/d2/de9d4e5196dd170c3d91e2d98b41438f6d6b10c50b608f9fec8e3bdf4d81/windmolen-0.0.1.tar.gz",
    "platform": null,
    "description": "# Windmolen\n\nTreat multiple asynchronous iterators like they are a single asynchronous iterator.\n\n**Example:**\n\n```python\nimport asyncio\nfrom windmolen import FanIn\n\n\nasync def async_iterator_1():\n    for i in range(1, 5):\n        yield i\n        await asyncio.sleep(0.5)\n\n\nasync def async_iterator_2():\n    for j in range(5, 9):\n        yield j\n        await asyncio.sleep(1)\n\n\nasync def main():\n    async with FanIn(async_iterator_1(), async_iterator_2()) as async_iterators:\n        async for item in async_iterators:\n            print(item)\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n## Install\n\n```shell\npip install windmolen\n```\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Treat multiple async iterators as a single async iterator.",
    "version": "0.0.1",
    "project_urls": null,
    "split_keywords": [
        "async",
        "iterator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "62e496df1a3605cd54af6edf74d5b350e7823c03cd3128465091f6a5e3d0e52a",
                "md5": "f49d13dcdd91f97a4367641eb2c3d0a6",
                "sha256": "7c07cf6b22e6e4d303c8c55143dbe92ecdfb416e8b2cc7e1fcd60bc58ff6c2d8"
            },
            "downloads": -1,
            "filename": "windmolen-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f49d13dcdd91f97a4367641eb2c3d0a6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 3532,
            "upload_time": "2023-06-14T19:35:25",
            "upload_time_iso_8601": "2023-06-14T19:35:25.852957Z",
            "url": "https://files.pythonhosted.org/packages/62/e4/96df1a3605cd54af6edf74d5b350e7823c03cd3128465091f6a5e3d0e52a/windmolen-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "08d2de9d4e5196dd170c3d91e2d98b41438f6d6b10c50b608f9fec8e3bdf4d81",
                "md5": "0806b24487aed21adf92cf56869a388c",
                "sha256": "15ae6bae4ca157e00a72700e9ee8d364dca0e4f2e4ddaf3ce0b43561c05cac92"
            },
            "downloads": -1,
            "filename": "windmolen-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "0806b24487aed21adf92cf56869a388c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 4799,
            "upload_time": "2023-06-14T19:35:27",
            "upload_time_iso_8601": "2023-06-14T19:35:27.658556Z",
            "url": "https://files.pythonhosted.org/packages/08/d2/de9d4e5196dd170c3d91e2d98b41438f6d6b10c50b608f9fec8e3bdf4d81/windmolen-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-14 19:35:27",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "windmolen"
}
        
Elapsed time: 0.08301s