Metadata-Version: 2.4
Name: chanio
Version: 0.1.0
Summary: Select and CSP combinators for AnyIO
Project-URL: Homepage, https://github.com/andefined/chanio
Project-URL: Repository, https://github.com/andefined/chanio
Project-URL: Issues, https://github.com/andefined/chanio/issues
Author-email: Dimitris Papaevagelou <dimitris.papaevagelou@andefined.com>
License-Expression: MIT
License-File: LICENSE
Keywords: anyio,asyncio,channel,concurrency,csp,select,trio
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: AnyIO
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: anyio>=4.0
Provides-Extra: trio
Requires-Dist: trio>=0.25; extra == 'trio'
Description-Content-Type: text/markdown

# chanio

Select and CSP combinators for [AnyIO](https://anyio.readthedocs.io/).

`chanio` adds the `select` statement and go-style fan-in/fan-out combinators
(`merge`, `tee`, `broadcast`, `worker_pool`, ...) on top of AnyIO memory
object streams, so it runs on both asyncio and Trio.

```python
import anyio
from chanio import Channel, select

async def main() -> None:
    ch = Channel[int](capacity=1)
    await ch.send(42)
    value, _ = await select(ch)
    print(value)

anyio.run(main)
```

## Status

Early alpha. API is not yet stable.

## Development

```bash
uv sync
uv run pytest
uv run ruff check .
uv run mypy src
```
