Skip to main content

Treat multiple async iterators as a single async iterator.

Project description

Windmolen

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

Example:

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

pip install windmolen

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

windmolen-0.0.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

windmolen-0.0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file windmolen-0.0.1.tar.gz.

File metadata

  • Download URL: windmolen-0.0.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for windmolen-0.0.1.tar.gz
Algorithm Hash digest
SHA256 15ae6bae4ca157e00a72700e9ee8d364dca0e4f2e4ddaf3ce0b43561c05cac92
MD5 0806b24487aed21adf92cf56869a388c
BLAKE2b-256 08d2de9d4e5196dd170c3d91e2d98b41438f6d6b10c50b608f9fec8e3bdf4d81

See more details on using hashes here.

File details

Details for the file windmolen-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: windmolen-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for windmolen-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c07cf6b22e6e4d303c8c55143dbe92ecdfb416e8b2cc7e1fcd60bc58ff6c2d8
MD5 f49d13dcdd91f97a4367641eb2c3d0a6
BLAKE2b-256 62e496df1a3605cd54af6edf74d5b350e7823c03cd3128465091f6a5e3d0e52a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page