skillfed

caio

Asynchronous file IO for Linux MacOS or Windows.

caio Permissive license Apache-2.0 Active 79 v0.12.2 released

Install

caio on PyPI

pip

pip install caio

uv

uv add caio

poetry

poetry add caio

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 9 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: caio-0.12.2-py3-none-any.whl

Intended Audience :: DevelopersNatural Language :: EnglishOperating System :: MacOSOperating System :: MicrosoftOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Free Threading :: 2 - BetaProgramming Language :: Python :: Implementation :: CPythonTopic :: Software DevelopmentTopic :: Software Development :: Libraries

About caio

from the package's own PyPI description — quoted content, verbatim

Python wrapper for AIO

Python bindings for async file I/O on Linux and a pure-Python/thread fallback for other platforms.

Three backends are available:

Backend Kernel Notes
linux_uring ≥ 5.6 io_uring - shared ring buffers, zero-syscall completions
linux_aio ≥ 4.18 kernel AIO (io_submit / io_getevents), O_DIRECT only
thread_aio any pthreads pool, portable
python_aio any pure Python, no C extension required

Example

```python import asyncio from caio import AsyncioContext

loop = asyncio.get_event_loop()

async def main(): # max_requests=128 by default ctx = AsyncioContext(max_requests=128)

with open("test.file", "wb+") as fp:
    fd = fp.fileno()

    # Execute one write operation
    await ctx.write(b"Hello world", fd, offset=0)

    # Execute one read operation
    print(await ctx.read(32, fd, offset=0))

    # Execute one...

Read as markdown · JSON record · Source repository

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

caio provides async file I/O for Python via multiple backends: io_uring and kernel AIO on Linux, thread pools, or pure Python fallback. It integrates with asyncio for non-blocking file operations.

Low friction installation with no runtime dependencies. Actively maintained with a recent release (9 days old) and steady repository activity.

Apache-2.0 is a permissive license allowing commercial use, modification, and distribution with minimal restrictions, requiring only license and copyright notice retention.

Usage

import asyncio
from caio import AsyncioContext

async def main():
    ctx = AsyncioContext(max_requests=128)
    with open("test.file", "wb+") as fp:
        await ctx.write(b"Hello", fp.fileno(), offset=0)
        print(await ctx.read(5, fp.fileno(), offset=0))

asyncio.run(main())

Requires Python ≥3.10. On Linux, io_uring (kernel ≥5.6) or kernel AIO (≥4.18) may be blocked by seccomp in containers; falls back to thread or pure-Python implementation if unavailable.

Verdict: caio is a well-maintained, dependency-free async file I/O library with permissive licensing and no known vulnerabilities. It offers high-performance backends on Linux and portable fallbacks elsewhere, making it suitable for production use where async disk I/O is needed.

Needs verification

  • Performance characteristics and overhead of each backend (io_uring vs thread vs pure-Python) under typical workloads
  • Compatibility with specific filesystems beyond the noted O_DIRECT requirement for linux_aio
  • Real-world adoption patterns and whether top_1000 tier reflects active production use
async file io pythonasyncio file operationsio_uring python bindingsnon-blocking file read writelinux aio wrapperasync disk iopython async file access

Similar packages