How ebonnal/streamable works
streamable is a dependency-free Python library for lazy, fluent synchronous and asynchronous iterable streams. The principal workflow wraps an iterable or iterable-producing callable, builds a chain of operations, traverses that chain through a sync or async visitor, and yields elements as the caller iterates. Operation coverage includes transformation, filtering, grouping, flattening, throttling, buffering, progress observation, and exception handling. The excerpts show async dispatch and both iterator engines; the synchronous visitor and some internal wiring are supported by the SOURCE INDEX and README, not inspected source excerpts.
Main entry points: _stream.py Lazy stream chain · _afunctions.py Async operation adapters · _iter.py Sync visitor · _aiter.py Async visitor
Components 17
Stream API
- Public API
streamable/__init__.py - Lazy stream chain
streamable/_stream.py
Iteration Dispatch
- Sync visitor
streamable/visitors/_iter.py - Async visitor
streamable/visitors/_aiter.py
Stream Operations
- Sync operation adapters
streamable/_functions.py - Async operation adapters
streamable/_afunctions.py - Sync iterators
streamable/_iterators.py - Async iterators
streamable/_aiterators.py
Runtime Support
- Iterator adapters
streamable/_tools/_iter.py - Async helpers
streamable/_tools/_async.py - Function adapters
streamable/_tools/_func.py - Argument validation
streamable/_tools/_validation.py - Progress records
streamable/_tools/_observation.py - Log formatting
streamable/_tools/_logging.py - Context management
streamable/_tools/_context.py
Other components
- Stream consumer
- Iterable source
Connections 20
- Stream consumer → Public API: imports
README.md - Iterable source → Lazy stream chain: wraps source
README.md - Public API → Lazy stream chain: exports
streamable/__init__.py - Stream consumer → Lazy stream chain: iterates
README.md - Lazy stream chain → Sync visitor: accepts visitor
streamable/_stream.py - Lazy stream chain → Async visitor: accepts visitor
streamable/_stream.py - Sync visitor → Sync operation adapters: dispatches operations
streamable/visitors/_iter.py - Async visitor → Async operation adapters: dispatches operations
streamable/visitors/_aiter.py - Sync operation adapters → Sync iterators: builds iterators
streamable/_functions.py - Async operation adapters → Async iterators: builds iterators
streamable/_afunctions.py - Sync visitor → Iterator adapters: adapts sources
streamable/visitors/_iter.py - Async visitor → Iterator adapters: adapts sources
streamable/visitors/_aiter.py - Async operation adapters → Function adapters: normalizes callbacks
streamable/_afunctions.py - Async operation adapters → Async helpers: uses async types
streamable/_afunctions.py - Async iterators → Iterator adapters: uses iterator protocols
streamable/_aiterators.py - Lazy stream chain → Argument validation: validates options
streamable/_stream.py - Lazy stream chain → Progress records: configures progress
streamable/_stream.py - Progress records → Log formatting: formats records
streamable/_tools/_observation.py - Async iterators → Context management: closes iterators
streamable/_aiterators.py - Stream consumer → Sync iterators: receives elements
README.md