Skip to main content

Asynchronous shutil module.

Project description

aioshutil: Asynchronous shutil module.

Downloads

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

$ pip install aioshutil

Usage

The API of aioshutil module is same as shutil module except that it is asynchronous.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aioshutil-1.3.tar.gz (7.9 kB view hashes)

Uploaded Source

Built Distribution

aioshutil-1.3-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page