aiopath
📁 Async pathlib for Python
What it is and what it does
aiopath is a direct reimplementation of Python's pathlib module designed to work with asyncio and trio, making all filesystem I/O operations awaitable. Instead of blocking the event loop during file operations, aiopath lets you perform concurrent disk and network I/O in async code. It mirrors pathlib's class hierarchy and API closely—AsyncPath inherits from Path, and methods that perform I/O are async versions of their synchronous counterparts. Methods like glob() return async generators, and file operations like read_text() and write_bytes() are fully awaitable.
The package depends on aiofile, anyio, and typing-extensions. It's useful when you're writing async Python code and want to avoid mixing blocking and non-blocking I/O—for example, in web scrapers that need to fetch multiple URLs concurrently and save responses to disk without stalling the event loop. The implementation wraps os.scandir() and DirEntry to make globbing completely asynchronous.
Use it for:
- Async web scrapers that fetch multiple URLs concurrently and write responses to disk without blocking the event loop.
- Building async file utilities or CLI tools that need to read/write many files concurrently.
- Replacing pathlib in async codebases where you need to traverse directories with glob() without blocking.
- Async data processing pipelines that read input files and write results concurrently.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Async-compatible reimplementation of Python's pathlib with awaitable I/O operations, compatible with asyncio and trio.
Yes, if you are actively writing asyncio or trio code and need pathlib-like filesystem operations without blocking. The low install friction and zero known vulnerabilities are positive. However, the dormant maintenance status means no active support for bugs or Python version changes—verify that Python 3.12+ support meets your needs and that the package's behavior is stable for your use case before relying on it in production.
Install
aiopath on PyPI
pip
pip install aiopathuv
uv add aiopathpoetry
poetry add aiopathInstalling aiopath
Before you install
Low install friction with a pure-wheel distribution. Maintenance is dormant—last release was over a year ago—so expect no active bug fixes or feature updates.
License in practice
Licensed under LGPL-3.0 (copyleft). Any derivative work or modification must be distributed under the same license; static linking and proprietary use are restricted.
Quickstart
from aiopath import AsyncPath
import asyncio
async def example():
path = AsyncPath('example.txt')
await path.write_text('hello')
content = await path.read_text()
print(content)
asyncio.run(example())
Requires Python 3.12 or later.
Verify before relying
- Whether libaio integration on Linux (mentioned in description) is functional or requires additional setup.
- Current status of the dormant repository and whether critical bug fixes are being accepted.
- Stability and compatibility of the package with Python 3.12+ given the dormant maintenance status.
Package facts
| License | LGPL-3.0 (copyleft) |
| Python support | supports the current Python release (>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — aiofile, anyio, typing-extensions |
| Maintenance | dormant — 1,033 days since the last release |
| First released | |
| Downloads | 209,724/month — #9,509 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aiopath-0.7.7-py2.py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
aiofileProvides asynchronous file I/O operations for…
permissive · top 1,000 on PyPI
aiofilesProvides non-blocking file I/O for asyncio…
permissive · top 1,000 on PyPI
pathProvides Path objects that wrap filesystem…
permissive · top 5,000 on PyPI
trioTrio is an async I/O library that lets you…
permissive · top 1,000 on PyPI
anyioAnyIO provides a unified asynchronous API that…
permissive · top 100 on PyPI
path.pyProvides Path objects that wrap filesystem…
permissive · top 15,000 on PyPI
anysqliteAnysqlite wraps SQLite with an async/await…
unclear · top 5,000 on PyPI
synchronicityWraps async functions, generators, and classes…
permissive · top 1,000 on PyPI
aioretryProvides a decorator-based retry mechanism for…
permissive · top 15,000 on PyPI
asyncioThis package is an obsolete backport of…
permissive · top 1,000 on PyPI