skillfed

aioshutil

Asynchronous shutil module.

aioshutil v1.6 385.9K downloads/30d#7,058 on PyPI49
Permissive license BSD License AGING released

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 aioshutil

uv

uv add aioshutil

poetry

poetry add aioshutil

Installing 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

Development Status :: 5 - Production/StableFramework :: AsyncIOLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

async file operationsasyncio shutilnon-blocking file copyasync rmtreeasyncio file utilitiesthread pool file operationsasync directory operations
asynciofile-operations

More Software Development packages