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.3.tar.gz (5.9 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.3-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: async_unzip-0.4.3.tar.gz
  • Upload date:
  • Size: 5.9 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.3.tar.gz
Algorithm Hash digest
SHA256 69a41ef5cc779695c8b3c39a6ff56fecb164332c1a02a7a5c071fd532a22e759
MD5 499ef82f3e2d4b284a29a301e2d9a61a
BLAKE2b-256 092b6f435d7581c2b26d005823fca32c94f4681e68d6492588429d733fe2b945

See more details on using hashes here.

File details

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

File metadata

  • Download URL: async_unzip-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 5.8 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 60dba93e295d512dfff18d43b9a2d391c7eb0174ac470af1022646a8f7a01dad
MD5 f9dd851c1b72411dd2e203fdbc0679af
BLAKE2b-256 337b9f27a6ad67addf7b00afd7a07ea3d894bae21e2c9e6ee8630e49785381f7

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