Skip to main content

Talyn: A robust, stable, and realistically fast Zig-powered event loop for Python's asyncio.

Project description

Talyn: Robust, Stable Asyncio Event Loop for Python

License Python Compatibility Linux Compatibility Zig Compatibility

Talyn is a robust, exceptionally stable, and realistically fast asyncio event loop drop-in replacement for Python, powered by the asynchronous capabilities of Zig and io_uring.

Talyn prioritizes correctness, complete system safety, and high usability over artificial micro-benchmark superiority. It is fully compatible with CPython's standard single-threaded and free-threaded (GIL-disabled) runtimes.


🚀 Features

  • Realistic Speed: Designed to deliver solid and reliable I/O performance on Linux by leveraging io_uring's native kernel-side asynchronous completion queues.
  • Robust & Crash-Resistant: Meticulously hardened against circular reference memory leaks, stack alignment faults, signal interrupt deadlocks, and use-after-free bugs.
  • Full Asyncio Compatibility: Passes 100% of standard Python asyncio, subprocess, transports, and connection-lifecycle test suites.
  • Modern Packaging: Fully migrated to PEP 517/518 standard declarative pyproject.toml configuration.
  • GIL-Disabled Free-Threading Ready: Fully compatible with python3.13t and python3.14t without memory races.

📜 Requirements

  • Python: >= 3.13 (Tested and verified under CPython 3.13, 3.14, 3.13t (free-threaded), and 3.14t (free-threaded))
  • Linux Kernel: >= 7.0 (Verified on Linux Kernel 7.0.x)
  • Zig Compiler (for source builds): 0.16.0 (Fedora packages)

[!NOTE] Tested Platform Verification: Talyn has been built, compiled, and verified extensively under Fedora 43-44 on an x86_64 architecture equipped with an Intel(R) Core(TM) Ultra 7 265 processor. Compatibility with other Linux distributions, older kernels, or alternative hardware architectures (e.g. AArch64) has not been verified yet. We welcome feedback and pull requests for other environments!


🔧 Installation

To compile and install Talyn locally, run:

pip install -e .

📦 Basic Usage

import talyn
import asyncio

async def main():
    print("Hello from Talyn!")
    await asyncio.sleep(1)
    print("Goodbye from Talyn!")

# Run using Talyn event loop
talyn.run(main())

💝 Historical Credits & Origin

Talyn is spun off from Leviathan, an event loop originally pioneered by Enrique Mora (@kython28). Enrique Mora's creative spark and vision of merging Zig, io_uring, and asyncio laid the critical foundation and architecture of this project.

As Talyn evolved, the implementation underwent a complete systems-level refactoring to transition from a theoretical prototype to a production-grade, crash-resistant runtime:

  • Eliminated multi-crossing Zig/Python vectorcall overhead by implementing a native C step trampoline.
  • Redesigned completion handlers into flat, GC-safe ring buffers.
  • Fully audited and resolved all memory-leak reference cycles under concurrent connections.

To honor the project's roots and Enrique's early work:


📄 License

This project is licensed under the MIT License. See LICENSE.md for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

talyn-0.4.0-cp314-cp314t-manylinux_2_36_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.36+ x86-64

talyn-0.4.0-cp314-cp314-manylinux_2_36_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.36+ x86-64

talyn-0.4.0-cp313-cp313t-manylinux_2_36_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.36+ x86-64

talyn-0.4.0-cp313-cp313-manylinux_2_36_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.36+ x86-64

File details

Details for the file talyn-0.4.0-cp314-cp314t-manylinux_2_36_x86_64.whl.

File metadata

File hashes

Hashes for talyn-0.4.0-cp314-cp314t-manylinux_2_36_x86_64.whl
Algorithm Hash digest
SHA256 efa1dad5c6c3d265c1b6ed6dfe1bef62a6f00869dae2da46b18f100ecd2f779b
MD5 d8d5bf059b3e83532d402e1dea907fcf
BLAKE2b-256 fa830bbe6598412e32b713cf00846470772159e83001fc7928d38c0a59e6ac74

See more details on using hashes here.

File details

Details for the file talyn-0.4.0-cp314-cp314-manylinux_2_36_x86_64.whl.

File metadata

File hashes

Hashes for talyn-0.4.0-cp314-cp314-manylinux_2_36_x86_64.whl
Algorithm Hash digest
SHA256 da0cd9295f61b22acb300e7d688d3b506532a52b86a0c8962dce6c24c4144ac5
MD5 76e5204bee38235a5ffd09e64e07e75e
BLAKE2b-256 c222f5a978e9954a96129240bc989a730a8e073ad9b65ef83f5f895145f116f9

See more details on using hashes here.

File details

Details for the file talyn-0.4.0-cp313-cp313t-manylinux_2_36_x86_64.whl.

File metadata

File hashes

Hashes for talyn-0.4.0-cp313-cp313t-manylinux_2_36_x86_64.whl
Algorithm Hash digest
SHA256 776c8d6148b049e4488e01356517fb9a36455ed06070fb03b17db5adf9a4009c
MD5 c5cabdc8192df48fcad2b21c37a72763
BLAKE2b-256 562cb82f678c170592fda72b92d77437be9af1ba711e8061ebfc6b755b95fe8c

See more details on using hashes here.

File details

Details for the file talyn-0.4.0-cp313-cp313-manylinux_2_36_x86_64.whl.

File metadata

File hashes

Hashes for talyn-0.4.0-cp313-cp313-manylinux_2_36_x86_64.whl
Algorithm Hash digest
SHA256 78b0f95655e5f864719ffa6bc224b9cbff7eefaf4f97d4ec27c0ac6e1c432b27
MD5 0a699d82c139bc599c6db57b5e5b31e6
BLAKE2b-256 b39d4ec86b49ca108626ab8706fe09a2a21d96c07aa46c1efd8f018561a1a8af

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page