skillfed

aiostream

Generator-based operators for asynchronous iteration

aiostream v0.7.1 4.0M downloads/30d#2,398 on PyPI919
Copyleft license GPL-3.0-or-later Active released

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 aiostream

uv

uv add aiostream

poetry

poetry add aiostream

Installing 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

Programming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

Tags

async stream operatorsasynchronous iteration pipelineasync itertoolsgenerator-based async operatorsasync data flow compositionreactive stream processingasync iterable utilities
async-iterationfunctional-programmingstream-processing

More Software Development packages