asynkio
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
Efferent (fan-out)
- diagnosticism (>= 0.16.0)
—
Durationstring formatting viananoseconds_to_string(); - Python standard library (
asyncio) — async timers;
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)
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.
Metadata
Release files for asynkio 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| asynkio-0.1.1.tar.gz | 20.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asynkio-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.4 kB
Release files / asynkio-0.1.1.tar.gz
| Download URL | asynkio-0.1.1.tar.gz |
|---|---|
| Size | 20.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd7752aa54b4daa0a2e97eca2f267be51fa4258eb8448d5e68350f96de510aa6
|
|
BLAKE2b-256 checksum How to use checksums |
e5179070f4b9de0871b4f8f526342ba1e0ec36957e358d7cca25d2457432efe8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / asynkio-0.1.1-py3-none-any.whl
| Download URL | asynkio-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8be9f22b5310d7ae18ad45fa402e7ffaf750b0d68c90606d9b0a8b12dfff1d34
|
|
BLAKE2b-256 checksum How to use checksums |
0b95abda18fd1bdc9ff8f8abe8de017cbd3fe462be2afcc18a4c140b237f59b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|