--- id: aiostream version: "0.7.1" license: GPL-3.0-or-later license_treatment: copyleft maintenance: active --- # aiostream — Generator-based operators for asynchronous iteration License: copyleft · Maintenance: active · Downloads: 4.0M/mo ## 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 above — 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 pip install aiostream uv add aiostream 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_current - Install friction: low - Maintenance: active - Downloads: 4.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags async stream operators, asynchronous iteration pipeline, async itertools, generator-based async operators, async data flow composition, reactive stream processing, async iterable utilities, async-iteration, functional-programming, stream-processing [View on SkillFed](https://skillfed.io/packages/aiostream) · [View on PyPI](https://pypi.org/project/aiostream/)