Skip to main content

Asynchronous channels and utilities.

Project description

Asynchronous channels for communication and synchronization between asyncio coroutines.

from asyncio_channel import create_channel

# Create a new channel.
ch = create_channel()

# Put an item on the channel; block until the item is accepted.
await ch.put(x)

# Take an item from the channel; block until an item is available.
x = await ch.take()

# Do something each time an item is put on the channel.
async for x in ch:
# Iteration stops when the channel is closed and drained.

Also contains several utilities for piping items between channels, mixing multiple input channels, routing messages by topic, and more.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for asyncio-channel, version 0.9.1
Filename, size File type Python version Upload date Hashes
Filename, size asyncio_channel-0.9.1-py2.py3-none-any.whl (18.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size asyncio-channel-0.9.1.tar.gz (12.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page