aiostream
Generator-based operators for asynchronous iteration
What it is and what it does
aiostream is a library for building asynchronous data pipelines using composable stream operators. It brings the functional programming style of itertools to async code, letting you chain operations like map, filter, zip, and reduce on asynchronous iterables using a pipe syntax. Streams are repeatable (each iteration creates a fresh iterator), support slicing and indexing, and can be awaited to extract their final value.
The library organizes operators into categories—creation, transformation, selection, combination, aggregation, advanced (flatten, switch, concatmap), timing (delay, timeout), and miscellaneous—making it straightforward to express complex async workflows. It requires Python 3.9+ and depends only on typing-extensions, keeping the install footprint minimal.
Use it for:
- Build async data pipelines that transform, filter, and combine streams from multiple async sources.
- Process time-series or event data with operators like spaceout, timeout, and delay for rate-limiting and scheduling.
- Compose async generators into reusable, readable workflows using pipe syntax instead of nested async comprehensions.
- Aggregate or reduce async sequences (e.g., accumulate values from a stream of async results).
- Implement reactive-style async workflows where operations are chained declaratively rather than imperatively.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
aiostream provides composable stream operators for building asynchronous data pipelines, similar to itertools but designed for async/await code.
Yes, if you work with async code and need composable stream operators. The low install friction, active maintenance, and lack of security issues make it a sound choice. However, the GPL-3.0-or-later copyleft license is a blocker for proprietary code unless you can satisfy its terms; verify licensing compatibility before committing.
Install
aiostream on PyPI
pip
pip install aiostreamuv
uv add aiostreampoetry
poetry add aiostreamInstalling aiostream
Before you install
Low install friction; pure Python wheel with only typing-extensions as a runtime dependency. Actively maintained with recent commits and no known vulnerabilities.
License in practice
GPL-3.0-or-later copyleft license requires derivative works to be distributed under compatible terms; consider licensing implications if integrating into proprietary code.
Quickstart
import asyncio
from aiostream import stream, pipe
async def main():
xs = stream.count(interval=0.2)
ys = xs | pipe.map(lambda x: x**2)
async with ys.stream() as streamer:
async for z in streamer:
print(z)
asyncio.run(main())
Requires Python 3.9 or later; async/await syntax and event loop management required.
Verify before relying
- Performance characteristics and memory overhead compared to manual async iteration or other stream libraries.
- Completeness of operator coverage relative to itertools for specific async use cases.
Package facts
| License | GPL-3.0-or-later (copyleft) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — typing-extensions |
| Maintenance | actively maintained — 305 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,013,870/month — #2,398 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aiostream-0.7.1-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
aeventkitaeventkit provides event-driven data pipelines…
permissive · top 15,000 on PyPI
RxRxPY provides a library for composing…
permissive · top 5,000 on PyPI
aioitertoolsProvides async-compatible versions of Python's…
permissive · top 1,000 on PyPI
reactivexRxPY is a library for building asynchronous and…
permissive · top 5,000 on PyPI
pipePipe enables shell-like infix syntax for…
permissive · top 15,000 on PyPI
eventkiteventkit provides an event-driven framework for…
permissive · top 5,000 on PyPI
aioconsoleProvides asynchronous equivalents to Python's…
copyleft · top 5,000 on PyPI
flupyFlupy provides a fluent interface for lazy…
permissive · top 5,000 on PyPI
sentence-streamSplits text streams into sentences even when…
permissive · top 15,000 on PyPI
django-activity-streamDjango Activity Stream generates and displays…
permissive · top 15,000 on PyPI