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

import asyncio
import uringio

async def main():
    async with await 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

import asyncio
import uringio

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

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

Fixed buffers - One of io_uring optimization features

import asyncio
import uringio

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.3

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.3
File Size Uploaded
uringio-0.4.3.tar.gz 42.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for uringio 0.4.3
File Interpreter ABI Platform
uringio-0.4.3-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.17+ x86-64, Linux glibc 2.28+ x86-64 Details
uringio-0.4.3-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.28+ x86-64, Linux glibc 2.17+ x86-64 Details
uringio-0.4.3-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.6 kB

Release files / uringio-0.4.3.tar.gz

Download URL uringio-0.4.3.tar.gz
Size 42.8 kB
Tags Source
SHA-256 checksum
How to use checksums
032de7f671757ae9a2a996390bfb0b85d6b4787b259c584516ef532a03663300
BLAKE2b-256 checksum
How to use checksums
95b1249c65847daa4992ddb775f04cd649ce0c6f995572fc58d0ab5684d3d45d
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 20, 2026.

Transparency log

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

Download URL uringio-0.4.3-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
c34c4e5a455253aba99ed95508254961c948e213e9e9cfb125c9a8a2ea524e28
BLAKE2b-256 checksum
How to use checksums
dc4e3b594772951300e6d65f3ce43baec56082248cb3f832915199a7c273d408
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 20, 2026.

Transparency log

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

Download URL uringio-0.4.3-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
fa56a891550a38957559e6539b227879be11c7f70f002494c53e4d6a95c5d5ac
BLAKE2b-256 checksum
How to use checksums
487308329ba0940f523d003c67571b5fb037c5cfc650db1a8144d7ddc59cc3ad
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 20, 2026.

Transparency log

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

Download URL uringio-0.4.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 282.9 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3abb458bdf0945ac5d1538b4e0875571904c155c21d5e752175de47fe4fc83a4
BLAKE2b-256 checksum
How to use checksums
c8c9ec82b4567995920ac3ff35fccfbe3143dd0a087c60a455caadb0cde5fc65
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 20, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.4

4 release files

This release

0.4.3 This release

4 release files

0.4.1

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