--- id: aiochannel version: "1.4.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # aiochannel — asyncio Channels (closable queues) inspired by golang License: permissive · Maintenance: active · Downloads: 88.8K/mo ## What it is and what it does aiochannel implements a channel abstraction for asyncio that mirrors Go's channel semantics. Unlike asyncio.Queue, a channel is considered "done" only when both closed and drained, so calling join() waits for full completion rather than just emptiness. The package provides async put/get methods that block until an item is available or space is free, non-async put_nowait/get_nowait variants, and async iteration support via async for loops. It raises ChannelClosed exceptions when operations occur on closed channels, giving explicit control over task synchronization. The library has been maintained since 2015 and currently supports Python 3.10 through 3.14 with full type hints. It carries no external runtime dependencies, making it lightweight to add to projects that already use asyncio. The API is intentionally similar to asyncio.Queue to minimize learning curve, but the close-and-drain semantics make it better suited for producer-consumer patterns where you need to signal completion and ensure all work is processed before proceeding. Use it for: - Coordinate work between multiple async tasks where you need to signal when production is complete and all items are consumed. - Implement producer-consumer pipelines in asyncio applications with explicit lifecycle management. - Replace asyncio.Queue when you need channels to remain closed permanently and distinguish between empty and closed states. - Build async task pools or worker patterns where tasks communicate through typed, closable message channels. - Migrate Go-style concurrent code to Python asyncio while preserving channel-based communication patterns. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides asyncio-compatible channels (closable queues) inspired by Go, allowing safe inter-task communication with explicit close and drain semantics. Yes. The package is actively maintained, has no dependencies, installs cleanly, and fills a real gap in asyncio's toolkit for applications that need Go-like channel semantics. The Apache-2.0 license is permissive. Install it if your asyncio code needs explicit close-and-drain lifecycle control or if you're porting Go patterns to Python. ## Install pip install aiochannel uv add aiochannel poetry add aiochannel ## Installing aiochannel Before you install: Low friction: pure Python wheel with no runtime dependencies. Actively maintained with a release 27 days ago and commits through August 2026; supports Python 3.10–3.14. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects. Quickstart: import asyncio from aiochannel import Channel async def main(): ch = Channel(100) await ch.put("hello") item = await ch.get() ch.close() await ch.join() asyncio.run(main()) Requires Python 3.10 or later; asyncio event loop must be running. Verify before relying: - Performance characteristics (throughput, latency) compared to asyncio.Queue under typical workloads. - Whether the package is used in production systems and what scale of deployments it supports. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 88.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags asyncio channel queue, async communication primitive, golang-style channels python, closable async queue, asyncio task coordination, async inter-process messaging, typed async channels, asyncio, concurrency-primitive, golang-inspired [View on SkillFed](https://skillfed.io/packages/aiochannel) · [View on PyPI](https://pypi.org/project/aiochannel/)