Skip to main content

pychanio

Go-style channels and select blocks for Python’s asyncio.

pychanio brings structured concurrency to Python, inspired by Go. It provides chan, select, go, and control signals like DONE and CANCEL.

✅ Features

  • Full-duplex and directional channels
  • Buffered and unbuffered behavior
  • << and >> DSL syntax for send/receive
  • Go-style select() block with timeout and default
  • Background goroutines with go(fn)
  • Built-in sentinels for clean signalling such as shutdown, heartbeat etc.
  • Works with native asyncio

📦 Installation

pip install pychanio

🔁 Example

import asyncio
from pychanio import chan, go, close

async def producer(ch):
    for i in range(3):
        ch << i
    close(ch)

async def consumer(ch):
    async for val in ch:
        print(val)

async def main():
    ch = chan()
    go(producer, ch)
    await consumer(ch)

asyncio.run(main())

📚 Docs

Find the docs here at: harsh-mishra.gitbook.io/pychanio

🛠 Requirements

  • Python 3.8+
  • asyncio

📄 License

MIT © 2025 Harsh Mishra

Metadata

Release files for pychanio 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pychanio 0.1.3
File Size Uploaded Provenance
pychanio-0.1.3.tar.gz 27.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pychanio 0.1.3
File Interpreter ABI Platform
pychanio-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 37.5 kB

Release files / pychanio-0.1.3.tar.gz

Download URL pychanio-0.1.3.tar.gz
Size 27.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1020ee341022bcc661e34f73c85a5521dd99e89566daafd99ce017b1de886b64
BLAKE2b-256 checksum
How to use checksums
697bf1c5a61d4ccdd9cf1c4f8d8f1b02a8be12cffbf27d1b9ae26332927c3680
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.20

Release files / pychanio-0.1.3-py3-none-any.whl

Download URL pychanio-0.1.3-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37e4da021c131fd99fc1f192d511326fcb00b7e80b580044a990df79d7ddc79d
BLAKE2b-256 checksum
How to use checksums
ec0309cbacec9dfe3cc22eb08032404fd6500e818a52e806b9f5dffe3297d7ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.20

Security for pychanio 0.1.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page