Skip to main content

asynkio

Tokio-like functionality for Python

Language License PyPI GitHub release Python CI PyPI project

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

GitHub Page

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) — Duration string formatting via nanoseconds_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).

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)

Source distribution for asynkio 0.1.1
File Size Uploaded
asynkio-0.1.1.tar.gz 20.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for asynkio 0.1.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

1 release file

0.0.1

1 release file

0.0.0.1

1 release file

0.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page