Collection of utilities to write safe asyncio code.
Project description
asynchrony
Python asyncio framework for writing safe and fast concurrent code.
Features:
- Type annotated and type safe
- Makes it easy to work with cancellation, errors, and scheduling.
- Well tested and well documented.
- Zero dependency.
- Based on real world experience and pain.
Installation and usage
python3 -m pip install asynchrony
A simple example of starting 100 tasks concurrently and waiting for all of them to finish:
from asynchrony import Tasks
async def download_page(url: str) -> bytes:
...
tasks = Tasks[bytes](timeout=10, max_concurrency=100)
for url in URLS:
tasks.start(download_page(url))
pages = await tasks
See tutorial for runnable usage examples.
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
asynchrony-0.1.0.tar.gz
(10.8 kB
view details)
Built Distribution
File details
Details for the file asynchrony-0.1.0.tar.gz
.
File metadata
- Download URL: asynchrony-0.1.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6320a68fbf4c97a1aa2f79c0b8bb04b4dd9e422cd8f7b13ac34ccb3a8616831d |
|
MD5 | 656b4d0920e9dff42ef91bc7f6f418b1 |
|
BLAKE2b-256 | e39e85277512d828785bbbb124abcca6789e7d63a4572eebe371e48174d89426 |
File details
Details for the file asynchrony-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: asynchrony-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dda4c692c43b8eabd4f612044b17438c7e9f4cfb15fc2a280ef0dd060963a785 |
|
MD5 | 01d40b1975dcb338faa4aa669486f0c5 |
|
BLAKE2b-256 | 56b78b8d738d16372973f811d7388f38aa6bfe9f8946fddf69c4671eeb8cfc28 |