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:
do_something(x)
do_something_else(x)
# 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
asyncio-channel-0.9.1.tar.gz
(12.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file asyncio-channel-0.9.1.tar.gz.
File metadata
- Download URL: asyncio-channel-0.9.1.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce362012f124d7cd45d51c7c383f2ba91a762fff6eecf8fc1abf4ad519c0500d
|
|
| MD5 |
a06a9f27e6457cb0bb824e761af2263f
|
|
| BLAKE2b-256 |
b3b025ac1d557529350134ecb240a619cf68963f138a48edb29a369273c4e391
|
File details
Details for the file asyncio_channel-0.9.1-py2.py3-none-any.whl.
File metadata
- Download URL: asyncio_channel-0.9.1-py2.py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3f0233fdf0ce6574efb85e46d972353c4ecd30fe032d68a47b7aaca44a84c3f
|
|
| MD5 |
7da2cb7679e898087afa3262833f1b7a
|
|
| BLAKE2b-256 |
f232b09a7e3c5d48f40244b6719eb4df9c056ecb97a1255a9b7a2c896ef560c2
|