Metadata-Version: 2.4
Name: tonio
Version: 0.1.0a1
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: Free Threading :: 2 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python
Classifier: Programming Language :: Rust
License-File: LICENSE
Summary: A multi-threaded async runtime
Keywords: async,io,threading,networking
Home-Page: https://github.com/gi0baro/tonio
Author-email: Giovanni Barillari <g@baro.dev>
License: BSD-3-Clause
Requires-Python: >=3.14
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/gi0baro/tonio
Project-URL: Funding, https://github.com/sponsors/gi0baro
Project-URL: Source, https://github.com/gi0baro/tonio

# TonIO

TonIO is a multi-threaded async runtime for free-threaded Python, built in Rust on top of the [mio crate](https://github.com/tokio-rs/mio), and inspired by [tinyio](https://github.com/patrick-kidger/tinyio) and [trio](https://github.com/python-trio/trio).

> **Warning**: TonIO is currently a work in progress and very pre-alpha state. The APIs are subtle to breaking changes.

> **Note:** TonIO is available on free-threaded Python and on Unix systems only.

## In a nutshell

```python
import tonio

def wait_and_add(x: int) -> int:
    yield tonio.sleep(1)
    return x + 1

def foo():
    four, five = yield tonio.spawn(wait_and_add(3), wait_and_add(4))
    return four, five

out = tonio.run(foo())
assert out == (4, 5)
```

## License

TonIO is released under the BSD License.

