Skip to main content

retread

A retread (/ˈriːtrɛd/) is a used tire whose tread has been replaced -- retread checks the quality of rebuilt Python wheels.

retread inspects and compares Python wheels. Given a downstream rebuild, it resolves the corresponding upstream wheel and reports which files differ, are missing, or were added -- without downloading entire wheel files.

It uses zipwire for efficient remote wheel access via HTTP range requests and pypi-simple to interact with package indexes.

Note: retread does not rebuild wheels. It only inspects and compares existing wheels.

Features

  • Compare upstream and downstream wheels without downloading entire files
  • Detect missing, extra, and modified files between wheel builds
  • CRC-32 based fast comparison from ZIP central directory metadata
  • Platform and ABI consistency checks (shared libraries, extension modules, Root-Is-Purelib, tag validation)
  • Show unified diffs of individual files between wheels
  • Both synchronous and asynchronous APIs
  • Pluggable HTTP backends: requests (default), httpx2, aiohttp
  • Text and JSON output formats

Installation

pip install retread

With optional async HTTP backends:

pip install retread[aiohttp]    # aiohttp (async)
pip install retread[httpx2]     # httpx2 (async, HTTP/2)
pip install retread[all]        # all backends

Usage

Compare wheels

Compare a downstream wheel against its upstream source on PyPI:

# Compare by URL
retread compare https://rebuild.example/foo-1.0-py3-none-any.whl

# Compare a local wheel file
retread compare /path/to/foo-1.0-py3-none-any.whl

# Resolve from a downstream index
retread compare foo-1.0-py3-none-any.whl --downstream-index https://rebuild.example/simple/

# JSON output
retread compare foo-1.0-py3-none-any.whl --downstream-index https://rebuild.example/simple/ -f json

Diff files

Show unified diffs of specific files between upstream and downstream wheels:

# Diff the METADATA file
retread diff https://rebuild.example/foo-1.0-py3-none-any.whl foo-1.0.dist-info/METADATA

# Diff multiple files
retread diff /path/to/foo-1.0-py3-none-any.whl foo-1.0.dist-info/METADATA foo-1.0.dist-info/WHEEL

Limitations

  • CPython only -- PyPy and other Python implementations are not supported.
  • Linux only -- Windows and macOS platform tags are not supported.
  • Architecture-based matching -- Upstream wheel matching uses CPU architecture suffixes (e.g. x86_64, aarch64) to fuzzy-match linux and manylinux platform tags. Manylinux version specifiers are ignored; a downstream linux_x86_64 wheel will match an upstream manylinux_2_28_x86_64 wheel. Musllinux wheels require an exact platform tag match.

License

Apache-2.0

Release files for retread 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for retread 0.2.0
File Size Uploaded
retread-0.2.0.tar.gz 96.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for retread 0.2.0
File Interpreter ABI Platform
retread-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 160.9 kB

Release files / retread-0.2.0.tar.gz

Download URL retread-0.2.0.tar.gz
Size 96.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cd60904e0a4e9e5a0cd2f2248d46b50b0b242a119b4f2da1434ffd63e0402e05
BLAKE2b-256 checksum
How to use checksums
6e2f0679b866fe11b05fc0307d735e55b5f2be52be129a7254f1e6c9b6be59df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / retread-0.2.0-py3-none-any.whl

Download URL retread-0.2.0-py3-none-any.whl
Size 64.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb12d0bb66be964c9583a1db11f141152532dd77b40ea41f9c31d383ee345048
BLAKE2b-256 checksum
How to use checksums
8cb958a90698ef8bb89fd4fe108d3d9e185deb489766739b9560f347eeac1639
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page