Tokio-like functionality for Python
Project description
asynkio - README
Tokio-like functionality for Python
Table of contents
Introduction
asynkio - a portmanteau of asyncio and Tokio, pronounced "ay sink ee-oh" - is a small, simple Python library that provides some of the features of the Rust Tokio library's features, such as Duration, Instant, and Interval.
Installation & Usage
Install via pip or pip3, as in:
$ pip3 install asynkio
Use via import:
from asynkio import (
Duration,
Instant,
Interval,
MissedTickBehaviour,
)
or:
from asynkio.time import (
Duration,
Instant,
Interval,
MissedTickBehaviour,
)
MissedTickBehavior (US spelling) is also exported as an alias for
MissedTickBehaviour.
Components
| Symbol | Description |
|---|---|
Duration |
Elapsed time, in nanoseconds (Tokio-like) |
Instant |
Point in time, as nanoseconds since the epoch |
Interval |
Async periodic timer with missed-tick policy |
MissedTickBehaviour |
Missed-tick policy (BURST, DELAY, SKIP) |
Examples
Examples are provided in the examples/ directory. See
EXAMPLES.md for a summary of each script.
Run a script with, for example:
$ uv sync
$ uv run python examples/interval_skip.py
Project Information
Where to get help
Contribution guidelines
Defect reports, feature requests, and pull requests are welcome on https://github.com/synesissoftware/asynkio.
Dependencies
asynkio has no runtime dependencies beyond the Python standard
library (asyncio).
Efferent (fan-out)
Libraries upon which asynkio depends:
None.
Development Dependencies
- aiofiles — development and demonstration tooling;
- black — code formatter;
- diagnosticism — example scripts under
examples/; - pyclasp — development and demonstration tooling;
- pytest — unit-test runner;
- ruff — linter;
Afferent (fan-in)
Projects that depend on asynkio:
None (currently).
Related projects
- Tokio (Rust) — the library whose time types asynkio emulates;
- Diagnosticism.Python — used in
examples/scripts;
License
asynkio is released under the 3-clause BSD license. See LICENSE for details.
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
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 asynkio-0.0.8.tar.gz.
File metadata
- Download URL: asynkio-0.0.8.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c088d4962c93612ab708648baf4a20a581373d3efe9f7e0b74787002299ec435
|
|
| MD5 |
0daf00821f110d6c4199543226babf18
|
|
| BLAKE2b-256 |
4e0e85eff72688744ebd504c5a82831ec8e2c048d7ad992ae3d8ef5e2c4b6429
|
File details
Details for the file asynkio-0.0.8-py3-none-any.whl.
File metadata
- Download URL: asynkio-0.0.8-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
458e0eb587c3d20cc3230342b5d6bf911bfc3cbc3262b549afec514f682c8536
|
|
| MD5 |
32f4eb6167180f6c256212c571fcd563
|
|
| BLAKE2b-256 |
13fbde2de2c9a2f672b9f124db6c14d92f733a2a3d362576e78808add92534d5
|