aiostream provides a collection of stream operators that can be combined to create asynchronous pipelines of operations. It can be seen as an asynchronous version of itertools, although some aspects are are slightly different, offering features like operator pipe-lining, repeatability, and safe iteration contexts. The library is currently at version 0.7.1 and maintains an active development and release cadence.
pip install aiostreamVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates creating an asynchronous stream, applying transformations using pipe operators, iterating through the stream, and awaiting a stream to collect its results.
Remove explicit instantiation of operators. For example, change `stream.map(func)` to `stream.map(source, func)` or `source | pipe.map(func)`.
Ensure that `stream.merge()`, `stream.chain()`, or `stream.ziplatest()` are always provided with one or more asynchronous iterable sources.
When using `pipe.map` or similar operators with a synchronous function, omit the `task_limit` and `ordered` arguments. Ensure these arguments are only used with asynchronous functions.
Upgrade your Python environment to version 3.9 or later to use `aiostream` versions 0.6.4 and above.
Install the package using 'pip install aiostream'.
Ensure the correct import statement: 'from aiostream import stream'.
Use 'async for' within an 'async with' context: 'async with stream.stream() as s: async for item in s: ...'.
Import 'pipe' separately: 'from aiostream import pipe'.
Use 'await' directly in an async function or use 'nest_asyncio' to allow nested event loops.
No dependency data recorded yet.