Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

comio – Composable I/O

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.

Packages

Package Description Install
comio Core I/O primitives pip install comio
comio-x Experimental extensions Install from git

Quick Example

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))

Repository Structure

packages/
  comio/          # core library
  comio-x/        # experimental extensions
Philosophy.md     # design rationale

License

MIT

About

Composable I/O primitives for Python

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages