Capability emerges from the composition of small, irreducible verbs.
A Turing machine — the foundation of every modern computer — reduces all operations to four verbs: reading, writing, stating, and branching. Stating and branching are as diverse as business domains, but reading and writing can be abstracted.
Comio provides 4 irreducible I/O primitives — Reader, Listener, Writer, Batcher — and composable functions that wire them together: scroll, read_all, copy, as_listener, pipe.
Read the full Philosophy for further understanding.
| Package | Description | Install |
|---|---|---|
| comio | Core I/O primitives | pip install comio |
| comio-x | Experimental extensions | Install from git |
import comio as io
from comio import pipe, PipeConfig
# pull-based reading
async for page in io.scroll(reader):
print(page.items)
# streaming pipe with backpressure
await pipe(listener, batcher, transform, cfg=PipeConfig(buffer=10))packages/
comio/ # core library
comio-x/ # experimental extensions
Philosophy.md # design rationale
MIT