Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kumaraditya303/aioshutil
Asynchronous version of functions of shutil module.
https://github.com/kumaraditya303/aioshutil
Last synced: 11 days ago
JSON representation
Asynchronous version of functions of shutil module.
- Host: GitHub
- URL: https://github.com/kumaraditya303/aioshutil
- Owner: kumaraditya303
- License: bsd-3-clause
- Created: 2021-04-04T14:02:48.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-09-01T05:10:49.000Z (about 1 year ago)
- Last Synced: 2024-05-03T18:45:27.626Z (6 months ago)
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 28
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# aioshutil: Asynchronous shutil module.
[![Downloads](https://static.pepy.tech/badge/aioshutil)](https://pepy.tech/project/aioshutil) ![](https://img.shields.io/pypi/v/aioshutil) ![](https://img.shields.io/pypi/pyversions/aioshutil) ![](https://img.shields.io/pypi/implementation/aioshutil)
# Introduction
`aioshutil` is a Python library which provides asynchronous version of function of shutil module. `shutil` module is blocking and using it in asyncio applications will block the event loop and slow down the application, `aioshutil` provides asynchronous friendly versions of the functions of the `shutil` module as it performs blocking io in a thread pool.
# Installation
```console
$ pip install aioshutil
```# Usage
The API of `aioshutil` module is same as `shutil` module except that it is asynchronous.
```python
from aioshutil import rmtree
await rmtree("/tmp")
````aioshutil` provides the following functions:
- `copyfileobj`
- `copyfile`
- `copymode`
- `copystat`
- `copy`
- `copy2`
- `copytree`
- `move`
- `rmtree`
- `make_archive`
- `get_archive_formats`
- `register_archive_format`
- `unregister_archive_format`
- `get_unpack_formats`
- `register_unpack_format`
- `unregister_unpack_format`
- `unpack_archive`
- `ignore_patterns`
- `chown`
- `which`
- `get_terminal_size``aioshutil` provides the following exceptions for consistency with `shutil` module:
- `Error`
- `SpecialFileError`
- `ExecError`
- `SameFileError`