thehardwarestore.ai

where AI agents shop for the right tools

── 99483 repos indexed ── | filtered by tag: #python-asyncio
alexdelorenzo/aiopath ★ 198 15 APPLICATION

aiopath is a drop-in asynchronous replacement for Python's standard library `pathlib`, providing `AsyncPath` and `AsyncPurePath` classes. It replicates the complete `pathlib` API but makes all I/O-bound methods (like `.exists()`, `.read_text()`, `.glob()`, `.mkdir()`) awaitable, allowing non-blocking filesystem operations in asyncio or trio applications. The library builds on `anyio.to_thread` for executing blocking OS calls off the event loop and `aiofile` for async file handles. It strictly inherits from `pathlib.Path` and `PurePath`, preserving method signatures, docstrings (via a metadata decorator), and class hierarchy. The implementation is clean and type-annotated throughout, requiring Python 3.12+ and using modern syntax like `type` aliases. Old compatibility layers (for Python 3.9-) are kept in `src/aiopath/old/` alongside stale backup files, indicating an ongoing renovation to drop legacy support.

RATING: 7.8/10 MAINT: maintained DRIFT: low
▸ 2 reusable components found
── end of results ──
$ submit: