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.2.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.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: async_unzip-0.4.2.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.2.tar.gz
Algorithm Hash digest
SHA256 fae4ddacd88f81798f993604314c2776ef790fc39dfb178970e1276b256c25d1
MD5 605614a54d30848e62f960c87793eb0a
BLAKE2b-256 d28cad2eab25352c1db3e031f170a221f126f8d01b11692177ac285799dd4631

See more details on using hashes here.

File details

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

File metadata

  • Download URL: async_unzip-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0acf09596d4121a4ee36f40eadc4a992c7b19bd6e0f4ca51b3db189d47726f3d
MD5 e5aa57b657cdcd20a396401a0df443dd
BLAKE2b-256 d97fe7679a89d7504bf1b3b519a92a870f2d268fa220b850f503d90e64899663

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