aiofile
Asynchronous file operations.
Install
aiofile on PyPI
pip
pip install aiofileuv
uv add aiofilepoetry
poetry add aiofilePackage facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — caio |
| 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: aiofile-3.12.3-py3-none-any.whl
Keywords: aio, asyncio, fileio, io, python
About aiofile
from the package's own PyPI description — quoted content, verbatim
AIOFile
Github Actions (image) Latest Version (image) Python Versions (image) License (image) Coverage Status (image)
Real asynchronous file operations with asyncio support.
Features
- Since version 2.0.0, uses caio, which provides multiple async I/O backends:
- Linux io_uring — the modern, high-performance Linux kernel AIO interface.
- Linux libaio — the classic kernel AIO mechanism via libaio.
- Thread-based (C) — a threadpool-backed implementation for POSIX systems (macOS, Linux).
- Pure Python — a thread-based fallback for any platform. *...
Read as markdown · JSON record · Source repository · Homepage
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
Provides real asynchronous file I/O operations for asyncio programs, automatically selecting the best backend (io_uring, libaio, thread-pool, or pure Python) based on system capabilities.
Low friction: pure Python wheel with a single compiled dependency (caio). Actively maintained with recent releases; last commit 2026-08-04 and 9 days since latest version. Supports Python 3.11–3.14.
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Usage
import asyncio
from aiofile import async_open
async def main():
async with async_open('test.txt', 'w+') as afp:
await afp.write('Hello')
afp.seek(0)
print(await afp.read())
asyncio.run(main())
Requires Python 3.11+. Linux native AIO and io_uring backends cannot open special files (/proc, /sys); use thread-based context for those.
Verdict: Production-ready async file I/O for asyncio applications with zero security vulnerabilities and active maintenance. Low install friction and permissive licensing make it a safe choice. Best suited for Linux/macOS; Windows users should verify thread-pool performance meets their needs.
Needs verification
- Performance characteristics of each backend (io_uring vs. libaio vs. thread-pool) under typical workloads
- Whether caio's compiled dependency introduces any platform-specific build issues beyond the documented limitations
Similar packages
permissive · top 1,000 on PyPI
json5permissive · top 1,000 on PyPI
aiofilespermissive · top 1,000 on PyPI
synchronicitypermissive · top 1,000 on PyPI
py-cpuinfopermissive · top 1,000 on PyPI
fastavropermissive · top 1,000 on PyPI
argcompletepermissive · top 1,000 on PyPI
argparsepermissive · top 1,000 on PyPI
pyproject-hookspermissive · top 1,000 on PyPI
gcloud-aio-storagepermissive · top 1,000 on PyPI