Skip to main content

Python function to construct a ZIP archive with stream processing - without having to store the entire ZIP in memory or disk

Project description

stream-zip

conda-forge package PyPI package Test suite Code coverage

Python function to construct a ZIP archive on the fly - without having to store the entire ZIP in memory or disk. This is useful in memory-constrained environments, or when you would like to start returning compressed data before you've even retrieved all the uncompressed data. Generating ZIPs on-demand in a web server is a typical use case for stream-zip.

Offers similar functionality to zipfly, but with a different API, and does not use Python's zipfile module under the hood. Creates both Zip32/2.0/Legacy and Zip64 files.

To unZIP files on the fly try stream-unzip.

Features

In addition to being memory efficient (with some limitations) stream-zip:

  • Constructs ZIP files that can be stream unzipped, for example by stream-unzip

  • Can construct Zip64 ZIP files. Zip64 ZIP files allow sizes far beyond the approximate 4GiB limit of the original ZIP format

  • Can construct ZIP files that contain symbolic links

  • Can construct ZIP files that contain directories, including empty directories

  • Can construct password protected / AES-256 encrypted ZIP files adhering to the WinZip AE-2 specification.

  • Allows the specification of permissions on the member files and directories (although not all clients respect them)

  • By default stores modification time as an extended timestamp. An extended timestamp is a more accurate timestamp than the original ZIP format allows

  • Provides an async interface (that uses threads under the hood)


Visit the stream-zip documentation for usage instructions.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

stream_zip-0.0.82.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

stream_zip-0.0.82-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file stream_zip-0.0.82.tar.gz.

File metadata

  • Download URL: stream_zip-0.0.82.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for stream_zip-0.0.82.tar.gz
Algorithm Hash digest
SHA256 6cde1dccb709d5487753f1f5d3ece43a28eca01717fc25a5ec53b55929a3c67e
MD5 64d81534a4fa0501464450bcdba01168
BLAKE2b-256 595dd79f961232ad316e1b8f7bc0bf432b804da60b70baf8f2866d00729379f2

See more details on using hashes here.

File details

Details for the file stream_zip-0.0.82-py3-none-any.whl.

File metadata

  • Download URL: stream_zip-0.0.82-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for stream_zip-0.0.82-py3-none-any.whl
Algorithm Hash digest
SHA256 35d25645fa470b10fbfb70068c9ddd7142cc381ee42bf05bec194fa25b4169a5
MD5 306bc7ccef725a57a67e8a4d8feb9f9c
BLAKE2b-256 ca4e2e3e083e2d7c7d28430c4688c6031ee3daa146741df7657d4960b375ae8b

See more details on using hashes here.

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