aioshutil
Asynchronous shutil module.
What it is and what it does
aioshutil wraps the standard library's shutil module to provide async-compatible versions of its functions. The standard shutil module performs blocking I/O operations that freeze an asyncio event loop when called directly; aioshutil offloads these operations to a thread pool, allowing the event loop to remain responsive. It mirrors shutil's API closely—functions like rmtree, copytree, move, and copy are available as async coroutines—and includes the same exception types for consistency.
The package is useful in asyncio applications that need to perform file system operations without stalling concurrent tasks. It supports modern Python versions and runs on both CPython and PyPy. With only typing-extensions as a runtime dependency, it has minimal overhead and integrates straightforwardly into existing async codebases.
Use it for:
- Removing or copying large directory trees in an async web server without blocking request handling.
- Performing batch file operations (move, archive) in a concurrent task scheduler without stalling other tasks.
- Implementing async cleanup routines in long-running services that must remain responsive to events.
- Building async CLI tools that need to manipulate files without freezing the event loop during I/O.
- Handling file operations in async test suites where blocking calls would timeout or deadlock.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides async-friendly versions of shutil functions that run blocking file operations in a thread pool, preventing event loop blocking in asyncio applications.
Yes, if you need shutil-like operations in an asyncio application. The API is familiar, install friction is minimal, and there are no known vulnerabilities. However, note that the package is aging (last update 297 days ago) and has modest adoption. It remains a solid choice for straightforward async file operations, but verify that its thread-pool approach meets your performance requirements.
Install
aioshutil on PyPI
pip
pip install aioshutiluv
uv add aioshutilpoetry
poetry add aioshutilInstalling aioshutil
Before you install
Low install friction with a single lightweight dependency (typing-extensions). Maintenance status is aging—last commit was 2025-10-21 and the package has not been updated in 297 days, though the repository remains active and not archived.
License in practice
BSD License (permissive) places no significant restrictions on use, modification, or distribution in most contexts.
Quickstart
pip install aioshutil
from aioshutil import rmtree
import asyncio
async def main():
await rmtree("/tmp/mydir")
asyncio.run(main())
Requires Python 3.8 or later; intended for use within an asyncio event loop.
Verify before relying
- Whether thread pool size is configurable or tunable for high-concurrency scenarios.
- Performance characteristics compared to native async file libraries in real-world workloads.
- Whether all shutil functions are fully implemented or if some have limitations.
Package facts
| License | BSD License (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — typing-extensions |
| Maintenance | aging — 297 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 385,870/month — #7,058 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aioshutil-1.6-py3-none-any.whl
Keywords: asyncio, io, shutil
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
aiofilesProvides non-blocking file I/O for asyncio…
permissive · top 1,000 on PyPI
blockbusterBlockbuster detects and prevents blocking calls…
permissive · top 5,000 on PyPI
aioprocessingProvides asyncio-compatible wrappers around…
permissive · top 15,000 on PyPI
pyserial-asyncioAdds async/await support to pyserial for…
permissive · top 15,000 on PyPI
mixpanel-py-asyncProvides asynchronous event batching and…
permissive · top 15,000 on PyPI
aiofileProvides asynchronous file I/O operations for…
permissive · top 1,000 on PyPI
synchronicityWraps async functions, generators, and classes…
permissive · top 1,000 on PyPI
aiosqliteaiosqlite provides an async interface to SQLite…
permissive · top 1,000 on PyPI
aiocopDetects and logs blocking I/O and CPU calls in…
permissive · top 15,000 on PyPI
python-logstash-asyncAsynchronous Python logging handler that…
permissive · top 5,000 on PyPI