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

Debian (unstable) package 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.84.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

stream_zip-0.0.84-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stream_zip-0.0.84.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stream_zip-0.0.84.tar.gz
Algorithm Hash digest
SHA256 32ba07c3c7fe947c0224a9f8e4a228f14080e01b17d8ffc78c16a6043b1fba12
MD5 175134caa12329124ede2debf5fda6f0
BLAKE2b-256 1bf2bc3d35c70735fa118eb3a49af8ce786863df87c910c14483daca5d056613

See more details on using hashes here.

Provenance

The following attestation bundles were made for stream_zip-0.0.84.tar.gz:

Publisher: deploy-package-to-pypi.yml on uktrade/stream-zip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: stream_zip-0.0.84-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stream_zip-0.0.84-py3-none-any.whl
Algorithm Hash digest
SHA256 4e3a68aba1aba643035c4b9e219a61de519752693ff727c3268581a1e70f1376
MD5 61ab19399419459d9ea35e420469f390
BLAKE2b-256 328ce11decad4ab23780503666170b09a8d0d07b15045b522b0ba94fc5df257f

See more details on using hashes here.

Provenance

The following attestation bundles were made for stream_zip-0.0.84-py3-none-any.whl:

Publisher: deploy-package-to-pypi.yml on uktrade/stream-zip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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