Skip to main content

blazio

A drop-in asyncio event loop for CPython, backed by zio.ev — the completion-based event loop from zio (io_uring on Linux, kqueue and IOCP elsewhere). Like uvloop, but on zio.ev instead of libuv, and with real asynchronous file I/O.

import asyncio
import blazio

async def main():
    reader, writer = await asyncio.open_connection("example.com", 80)
    writer.write(b"GET / HTTP/1.0\r\nHost: example.com\r\n\r\n")
    await writer.drain()
    print(await reader.read())
    writer.close()

asyncio.run(main(), loop_factory=blazio.new_event_loop)

That loop_factory argument is the only change; the rest of your program is standard asyncio.

Async files

blazio.open() is an aiofiles-compatible API over zio.ev's file completions — real asynchronous file I/O, not a thread pool.

async with blazio.open("access.log") as f:
    async for line in f:
        ...

Seekable files also support positional pread/pwrite.

Performance

About 1.15x uvloop on transport-based HTTP. Measured on one Linux machine (io_uring, CPython 3.12, ReleaseFast): 20 s wrk runs after a 30 s settle, 100 connections. benchmarks/ reproduces them.

Both drive the Transport/Protocol layer, which is what real servers (uvicorn, aiohttp, asyncio streams) run on. The low-level loop.sock_* API is a separate path that the three loops optimize very differently, so it is not benchmarked here.

benchmarks/mini_http_server.py — a minimal Protocol writing a fixed 1 KB response, with no framework in the path, so this is close to raw loop overhead:

loop req/s p50 p90
asyncio 101,428 0.91ms 1.03ms
uvloop 127,036 0.74ms 0.81ms
blazio 144,781 0.64ms 0.88ms

benchmarks/uvicorn_server.py — the same response through uvicorn. Most of each request is now framework Python that every loop pays equally, so all three drop sharply while the ratio between them holds:

loop req/s p50 p90
asyncio 23,501 4.02ms 4.27ms
uvloop 41,596 2.29ms 2.35ms
blazio 48,274 1.74ms 2.53ms

Install

pip install git+https://github.com/lalinsky/blazio

Requires CPython 3.12 or newer and Zig 0.16 on PATH.

From a checkout, with the tests:

pip install .
python -m pytest tests/

License

MIT. See LICENSE.

Metadata

Release files for blazio 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blazio 0.1.0
File Size Uploaded Provenance
blazio-0.1.0.tar.gz 66.1 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for blazio 0.1.0
File
blazio-0.1.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
blazio-0.1.0-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details
blazio-0.1.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
blazio-0.1.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
blazio-0.1.0-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
blazio-0.1.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
blazio-0.1.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
blazio-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
blazio-0.1.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details

Total release size: 5.6 MB

Release files / blazio-0.1.0.tar.gz

Download URL blazio-0.1.0.tar.gz
Size 66.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2081ccba81aa92afe6019f93d1ad5e4ae09c77a18c3531ca1e46b01295eccc79
BLAKE2b-256 checksum
How to use checksums
b69a2fa62a23be423b1fdddecb0d16f3ce58df5bbd6e8941003dfc9f1faff7be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.

Transparency log

Release files / blazio-0.1.0-cp314-cp314-win_amd64.whl

Download URL blazio-0.1.0-cp314-cp314-win_amd64.whl
Size 350.0 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
5d71b0e9b4efd9800f9b7434fe87e2e8a28917f69c268614a2d7a86fdac77b66
BLAKE2b-256 checksum
How to use checksums
e51e426bb322f2ec982c268a1318cdb7d99bfa724457b1a5c9e20efceee9baba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.

Transparency log

Release files / blazio-0.1.0-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL blazio-0.1.0-cp314-cp314-manylinux_2_28_x86_64.whl
Size 1.3 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
9110f56c48118021060a8494aaac804065c3b8621a5ec5adcfacc58999bb4e2f
BLAKE2b-256 checksum
How to use checksums
09cc4f47a782c20f48a15eee61c5c82a2b6dcee62d87fb42b75e1f05b0f0aa50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.

Transparency log

Release files / blazio-0.1.0-cp314-cp314-macosx_11_0_arm64.whl

Download URL blazio-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
Size 240.4 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c8257ad530c3119a365e8af8ee0d869904ee551926d309ad6869ca0a69d8ff47
BLAKE2b-256 checksum
How to use checksums
0b5c2b944fd373c104608df14f045e4c42cd5deda1918231b43ae23f6d5e70b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.

Transparency log

Release files / blazio-0.1.0-cp313-cp313-win_amd64.whl

Download URL blazio-0.1.0-cp313-cp313-win_amd64.whl
Size 339.6 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
36c70971a9e21eed754ca9e210c28e0338bf7f6f30838310489ebb4d0bc690e3
BLAKE2b-256 checksum
How to use checksums
ed3efbbbab6f995c49641d02f66752e738345152b6f4839b2c48329bd7ea2d82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.

Transparency log

Release files / blazio-0.1.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL blazio-0.1.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 1.3 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
83d91e1a09594c5945d2a39caee45002e026930f188093c03d1c009f66c752b4
BLAKE2b-256 checksum
How to use checksums
f1fb068edd890c1537df7f7be8e90b8e009a336190eaaeaf84932d6314b4c738
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.

Transparency log

Release files / blazio-0.1.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL blazio-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Size 240.3 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5f3919c50dc61dff97812a474eba3581b6987a037177b8da6f180fec54532119
BLAKE2b-256 checksum
How to use checksums
325563f06131ed1081644d297e36d30f7f6aae3df8b068d31a44ff88f397f809
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.

Transparency log

Release files / blazio-0.1.0-cp312-cp312-win_amd64.whl

Download URL blazio-0.1.0-cp312-cp312-win_amd64.whl
Size 339.6 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
f4901d3d4c266f0193a4db490281e07dd1ac2d025f10b55adffc06fd4eabf1ce
BLAKE2b-256 checksum
How to use checksums
625135f369c325d4fb9a420520a14305a0d73516ca3bbd98b21d1c5a3ee8fee8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.

Transparency log

Release files / blazio-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL blazio-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 1.3 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
bcd31f3a022e043156a334dffad213c4cb26df43f28bcc1210b6beb9d7070650
BLAKE2b-256 checksum
How to use checksums
70ed7a29941e90e24e433ffb56da2d0f7c0f5793d5031aa2fed6d3069dbf2de9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.

Transparency log

Release files / blazio-0.1.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL blazio-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Size 240.3 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
df75be4bb5018f7cb614a736a82433aba83086e380f041c970ec725b3b137d9a
BLAKE2b-256 checksum
How to use checksums
5b32d563881c6c7be69f516c8a21463bfda73759c26e4eb6ccb8acacdfba2b16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.

Transparency log

Security for blazio 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 10 files in this release have been uploaded with provenance metadata.

Select from 10 files

Attestation for blazio-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

10 release files Full provenance

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