noio
noio brings together two big ideas:
that many IO operations can support callers waiting on multiple things at once without compromise,
and that IO can be abstracted across ordinary functions and coroutines.
Use select to wait for the first of several selectable operations to complete.
Use routine to support ordinary and coroutine calls with one interface.
Wait for the first operation to complete
Queues provide selectable get and put methods.
Ordinary calls wait for values from each queue in turn:
from noio import Queue
primary = Queue[str]()
secondary = Queue[str]()
# Producers in other threads or tasks put values into these queues.
primary_value = primary.get()
secondary_value = secondary.get()
The first call waits for primary, even if secondary already has data available.
Use select to get a value from whichever queue can deliver first:
from noio.select import select
index, value = select(
primary.get.select(),
secondary.get.select(),
)
If primary wins, index is 0 and value comes from primary.
If secondary wins, index is 1 and value comes from secondary.
The other queue keeps its values for a later get.
See selection and queues for usage.
Support ordinary and coroutine calls
Coroutines are an advanced feature that should be avoided wherever reasonable. When writing a new library, start with regular functions, which are able to support threads and green threads. It might look something like this:
import noio
def greeting(name: str) -> str:
noio.sleep(0.1)
return f"Hello, {name}!"
assert greeting("world") == "Hello, world!"
When it's important for your function to also support coroutine libraries
like asyncio, trio and anyio,
update it to look like something like this:
import asyncio
import noio
@noio.routine
async def greeting(name: str) -> str:
await noio.sleep.a(0.1)
return f"Hello, {name}!"
@noio.routine
async def introduction(name: str) -> str:
return await greeting.a(name)
assert greeting("world") == "Hello, world!"
assert introduction("world") == "Hello, world!"
assert asyncio.run(introduction.a("world")) == "Hello, world!"
When existing callers call your function the same way they used to,
it will work without modification
because it will drive the coroutine implementation to completion directly.
Other routines will await a new .a() version
that allows the run loop to handle scheduling.
Finding all the places to convert can be tricky,
so noio will raise an error
if a routine implementation calls another routine with a regular function call.
See routines for usage and customization.
Contributing
Before making changes, read CONTRIBUTING.md.
Metadata
Release files for noio 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| noio-0.2.tar.gz | 76.8 kB | With provenance | Details for noio-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| noio-0.2-py3-none-any.whl | Python 3 | none | any | Details for noio-0.2-py3-none-any.whl |
Total release size: 170.6 kB
Release files / noio-0.2.tar.gz
| Download URL | noio-0.2.tar.gz |
|---|---|
| Size | 76.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ebbba1920a7a15a4c7e83d46673436bf894426bac6cd6616c5f3adb7d4453582
|
|
BLAKE2b-256 checksum How to use checksums |
8d5b6137c67699431fc61a62aa15665df9a9e65d0bf759b043dc9fcefe40a5b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.
Transparency logRelease files / noio-0.2-py3-none-any.whl
| Download URL | noio-0.2-py3-none-any.whl |
|---|---|
| Size | 93.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
263b70c5a3bd30e57aedd0e5ee9bbfcf68ea23de328efb1b9163b8b14483e58a
|
|
BLAKE2b-256 checksum How to use checksums |
a8c25de9b3c7a2779c704ae30fa612500fa25c648a8f1bdb88d2817ea1e5c9ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.
Transparency logSecurity for noio 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for noio-0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.