Skip to main content

Reproducible ZipFile (supports shutil.archive)

Project description

Reproducible / Deterministic ZipFiles

A tool to generate consistent zip files.

Installation

pip install rzip

Usage

The module uses the same interface as the python builtin zipfile module:

python -m rzip

How does it work?

There are four tricks to building a deterministic zip:

  1. Files must be added to the zip in the same order. rzip sorts all directories and files (with directories first) before adding them to the zip archive.

  2. Files in the zip must have consistent timestamps. The timestamp of files and directories is set to the minimum timestamp for zipfiles: 1980-01-01 00:00:00.

  3. Files in the zip must have consistent permissions. All permission bits are set -rwxrwxrwx for files and drwxrwxrwx for directories.

  4. The "create system" for all files is set to "unix-like" (3) to ensure the correct intrepretation of the external_attrs/permissons.

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

reproducible_zip-0.1.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

reproducible_zip-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file reproducible_zip-0.1.0.tar.gz.

File metadata

  • Download URL: reproducible_zip-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for reproducible_zip-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c499fe68f5715c83db08f866a1c066e2074f0e3e58d0822ebe6766d1cf6a7cce
MD5 7e858d4ab6903a74231947f88c1d67a5
BLAKE2b-256 85c0db2d7fa89193cc40d57cfc9a440529af0dfda7c734b24b2c43f43fa6ad9b

See more details on using hashes here.

File details

Details for the file reproducible_zip-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for reproducible_zip-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 517fcfe467ef70b4f40f91937fed51e336840be2033aad2da26d0d466fb24706
MD5 4bb0f13bf5f990b630f52b32d1011f34
BLAKE2b-256 83bddabc72a1150df77d4ac1aaf7f660abde4bf0382a57289f51d9d953bc2b0c

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