Skip to main content

Reproducible ZipFile (supports shutil.archive)

Project description

Reproducible / Deterministic ZipFiles

A tool to generate consistent zip files.

Installation

pip install reproducible_zip

Usage

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

python -m reproducible_zip

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.3.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.3.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reproducible_zip-0.3.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.3.0.tar.gz
Algorithm Hash digest
SHA256 0a761e882358b3a0a2148ffc68c15cdccc00e5a650b359bbb45efe67a6a5f6b9
MD5 f50d1532837f52e7e247b64a0d21d301
BLAKE2b-256 9c65f023a676c9d3adbbd275074059b7fc9baaf5cf2275eb94cd18505d588697

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reproducible_zip-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e22fe649c737dcbdbf4f179ffd27a3b53ac5a97ba5362ca5bb845b852c75aab8
MD5 3f93696ee0d986fd2869668ddefa58f4
BLAKE2b-256 1eb748cfc41c5468d0ac1fcbf7998a35f6b0254bed5819850c4b1ae76c48e8b7

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