Skip to main content

uringio

Linux Python Version from PEP 621 TOML GitHub Release

uringio brings true asynchronous file I/O to Python with a native event loop built on io_uring, implemented as C extension for CPython.

⚠️ Currently in active development, so API and internals may change and will be evolved.

Quick Examples

Files

async def main():
    async with uringio.open_file(path='testfile.txt') as file:
        data = b'Hello, uringio!\n'
        await file.write(data=data)
        result = await file.read()

asyncio.run(main(), loop_factory=uringio.UringioLoop)

Sockets

async def main():
    async with await uringio.prep_socket() as socket:
        await socket.connect('127.0.0.1', 9000)
        await socket.send(b'hello')
        data = await socket.recv()

asyncio.run(main(), loop_factory=uringio.UringioLoop)

Fixed buffers - One of io_uring optimization features

async def main():
    loop = asyncio.get_running_loop()
    buf = bytearray(4096)
    with loop.buffer_mode(mode=uringio.BUFFER_MODE.FIXED, buffers=[buf]):
        await simple_file_example()

asyncio.run(main(), loop_factory=uringio.UringioLoop)

See the whole user guide

See API page

Also, you can watch examples inside docs/examples and run them under ASAN with

make run-examples

Benchmarks

uringio shows that true file async I/O provided by io_uring is superior over current solutions and shows x2 and almost x3 performance:

Write files sequentially

sequential write files

Write files using vector operations

vectored write

uringio also shows better performance over other solutions in socket operations:

Socket connection storm

many connections

⚠️ But uringio and io_uring are not a magic wands, so there are scenarios when its better not to use it. For example:

Load test of concurrent TCP connections with I/O operations

echo fanout

As you can see, with little amount of connections there is no reason to use uringio because of CQEs and SQEs overhead. However, when it comes to many connections - it is the only backend that not degrading under pressure.

Read more about benchmark results in Benchmarks analysis page

Installation

Warning! Linux only uringio requires linux kernel version 6.11 or greater and Python 3.12 or greater. Library is available on PyPI, so use pip to install it:

pip install uringio

Build and use

To build and install use

make install

You can only build by using

make build

Run tests:

make test-all

Run tests under ASAN:

make test-all-asan

While working with code, dont forget to

make lint

Watch more commands in developer guide or inside Makefile. Currently tested only on Fedora 43 with 7.1.5 kernel version

Architecture

io_uring

uringio is written natively as C extension for CPython and brings the new event loop, based on io_uring.

What is io_uring and how it works, explained shortly by us - here

Presenting new objects

  • Main:
    • UringioLoop
    • File
    • Socket
  • Helpers:
    • BufferModeCtx
    • StreamStrategyCtx
    • TransferModeCtx
    • ExecutionContextCtx
  • Enums:
    • BUFFER_MODE
    • STREAM_STRATEGY
    • TRANSFER_MODE
    • PAYLOAD_TYPE
    • Resolve Flags
    • Statx Flags
    • StatxMask

Whole documentation about their purposes and how they work is in architecture page

Structure

Structure of this project is trying to be simple - we have pure c-layer and pure python-layer and layer in between.

  • C-layer - Functionality written entirely in C and basically wrappers aroung liburing ABI
  • Python-layer - By analogy it is layer, written with usage of CPython API and CPython objects.
  • Layer in between - for now here is really only one thing - registry. It is container to hold objects in between. I wish i could say that in between C-layer and Python-layer, but the meaning is not so. We are working with async nature and giving control of the operations to kernel, so we can do our things. To map the result of kernel with what was intended we need some sort of storage - this is registry.

Domains

  • Ring
  • Event Loop
  • Reader
  • OPS
  • Buffers
  • Execution Context
  • Registry
  • Timer
  • Signals

To read about implementation details, go to architecture page

Contributing

We are looking for help with:

  1. Propose new features. You can choose something from our roadmap - you can add new checks yourself, but create an issue first.
  2. Testing on different Linux Distros/Kernels. If you'll find some issues - create some on GitHub.
  3. Sharing experience in memory management, libraries architecture, cpython, io_uring, epoll and many other things.
  4. Write tests and benchmarks
  5. Report bugs

Read next

Roadmap

See here

Metadata

Release files for uringio 0.4.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 uringio 0.4.1
File Size Uploaded
uringio-0.4.1.tar.gz 42.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for uringio 0.4.1
File Interpreter ABI Platform
uringio-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details
uringio-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
uringio-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details

Total release size: 892.4 kB

Release files / uringio-0.4.1.tar.gz

Download URL uringio-0.4.1.tar.gz
Size 42.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6fcc5d4b4607dfa4bb8c280447dbd4e0e181d2ecdb0df50ef7d268891fbbf0f6
BLAKE2b-256 checksum
How to use checksums
bf5c8411103cac5c954f3c548266c08961192cef09e438f7d57726491166ddde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Aug 19, 2026.

Transparency log

Release files / uringio-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL uringio-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 284.2 kB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
49e51ce3200bce100ab01ed6c4a92c0d7acb04bd459f5b849f6122ec3a7d9235
BLAKE2b-256 checksum
How to use checksums
187a699eef539d59b6e25a159329bdedd7605a00fde325e1de1739e3a9e40518
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Aug 19, 2026.

Transparency log

Release files / uringio-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL uringio-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 282.7 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8ed4a5691aa09d5e8399999dc87fe76be89661dcc53562445d02eff330620462
BLAKE2b-256 checksum
How to use checksums
7a8079e50f7978edcf016ad5b626941aaa3af34971f74415dc6ebda6c334e62c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Aug 19, 2026.

Transparency log

Release files / uringio-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL uringio-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 282.8 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
68149ff064abb1b5f4156bacc97fc77c6458dd949e05aa563dabaeb18ebd8a96
BLAKE2b-256 checksum
How to use checksums
f4dda575d2e0cf70b748eb5d3e76edb4e4d11500b0ab0798ad925df5d7cf6462
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Aug 19, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.4

4 release files

0.4.3

4 release files

This release

0.4.1 This release

4 release files

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