Skip to main content

Async unzipping to prevent asyncio timeout errors and decrease the memory usage for bigger zip files

Project description

async-unzip

Asynchronous unzipping of big files with low memory usage in Python Helps with big zip files unpacking (memory usage + buffer_size could be changed). Also, prevents having Asyncio Timeout errors especially in case of many workers using same CPU cores.

Fully tested on Python 3.7 through 3.14.

By default the extractor schedules up to 4 concurrent workers. Tune concurrency via the max_workers argument:

asyncio.run(unzip('archive.zip', path='output', max_workers=8))

When uvloop is installed, the event loop policy switches automatically to leverage its faster reactor.

From version 0.3.6 module doesn't require, but expects to have aiofile OR aiofiles to be installed for I/O operations. However, aiofile is recommended for linux, just don't forget to install libaio (libaio1) linux module (e.g., apt install -y libaio1 for debian)

from async_unzip.unzipper import unzip
import asyncio

asyncio.run(unzip('tests/test_files/fixture_beta.zip', path='some_dir'))

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

async_unzip-0.4.4.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

async_unzip-0.4.4-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file async_unzip-0.4.4.tar.gz.

File metadata

  • Download URL: async_unzip-0.4.4.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for async_unzip-0.4.4.tar.gz
Algorithm Hash digest
SHA256 75def5949ba8a54a75b04b5f0fb7dcf0962923d93a9af9485b27c425abe76683
MD5 e81d539f8c07266a7f591b82868cb847
BLAKE2b-256 3fa4a86c7b9179c968e10dc65495286a650a9c0677b3087ebe0660bfb4cafb67

See more details on using hashes here.

File details

Details for the file async_unzip-0.4.4-py3-none-any.whl.

File metadata

  • Download URL: async_unzip-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for async_unzip-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 305e68d716b4ea9c9625d2881c41058f5f54d480e3fd9091c4c7a5ea89c71cfc
MD5 6c5e2157618cb60ac9ee7e1d2d6b100a
BLAKE2b-256 df93c760e4c7193e69d1714b67859a56c034b64bcca306bfe46bcf456522d8ea

See more details on using hashes here.

Supported by

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