--- id: caio version: "0.12.2" license: Apache-2.0 license_treatment: permissive maintenance: active --- # caio — Asynchronous file IO for Linux MacOS or Windows. License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install caio uv add caio poetry add caio ## Description 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... ## AI interpretation — verify before relying 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. 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. [View on SkillFed](https://skillfed.io/packages/caio) · [View on PyPI](https://pypi.org/project/caio/)