envstamp
Atomic, reproducible fingerprints of installed Python distributions.
envstamp is a small stdlib-only package for recording installed package versions and content
fingerprints in an atomic JSON stamp.
Installation
pip install envstamp
envstamp requires Python 3.12 or newer.
CLI
Get a stamp for one or more installed distributions and print it:
envstamp get numpy pandas
Search explicit distribution paths:
envstamp get numpy pandas --paths /path/to/site-packages
Atomically write the stamp to a file:
envstamp get numpy pandas --output /tmp/envstamp.json
Read the saved stamp:
envstamp read /tmp/envstamp.json
Each package record contains its canonical name, installed version, fingerprint algorithm, package-level SHA-256, and the number of files included in that digest. Package records are sorted by canonical name.
Python API
import sys
from envstamp.stamp import get_stamp, read_stamp, write_stamp
stamp = get_stamp(["numpy", "pandas"], paths=sys.path)
write_stamp("/tmp/envstamp.json", stamp)
saved = read_stamp("/tmp/envstamp.json")
for package in saved.packages:
print(package.canonical_name, package.version, package.sha256)
Pass the distribution search paths explicitly through get_stamp(..., paths=...).
envstamp supports regular, non-editable installations. It reads
.dist-info/direct_url.json when present and rejects the distribution when
dir_info.editable is true, because that metadata points at a mutable source tree rather than a
stable installed payload.
Fingerprint protocol
The envstamp-sha256-v1 algorithm starts from each installed distribution manifest, but only
includes entries that resolve inside its installation root, normally site-packages. This covers
Python code, native libraries such as .so and .pyd, and package data. Distribution metadata,
bytecode caches, .pth and .egg-link path files, launch scripts, and external data are excluded.
RECORD hashes are not used as an inclusion filter. When an included entry has no RECORD hash,
envstamp still reads and hashes the installed file directly. If that file is missing,
fingerprinting fails instead of silently producing a partial digest.
File paths are sorted before the package digest hashes the protocol tag followed by
path\0sha256\0size\n records. The read buffer size does not affect the resulting digest.
Atomic writes
Each stamp file belongs to one writer and contains one complete stamp. A write creates a same-directory temporary file, flushes it, and atomically replaces the previous stamp file. On POSIX, readers therefore observe either the previous complete stamp or the new complete stamp. Concurrent writers to the same path are not supported; use a separate file for each process.
Metadata
Release files for envstamp 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| envstamp-0.1.2.tar.gz | 7.6 kB | With provenance | Details for envstamp-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| envstamp-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for envstamp-0.1.2-py3-none-any.whl |
Total release size: 14.7 kB
Release files / envstamp-0.1.2.tar.gz
| Download URL | envstamp-0.1.2.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ec6d5e4e0e8173e34cb0b2a572ae4dc64fac2f671ce05adc68dbb8599498330
|
|
BLAKE2b-256 checksum How to use checksums |
bd6631d73eaa93bd0eeae5a74764d2544b60140888b4d673a4c87e29276be484
|
| 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 Sep 1, 2026.
Transparency logRelease files / envstamp-0.1.2-py3-none-any.whl
| Download URL | envstamp-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40c35e661fde63a308dd9b795c76a0fc74cb3059eee910eba7e6c36b13d30f63
|
|
BLAKE2b-256 checksum How to use checksums |
a15e5f6826a850e8852af8a9ea73821c775c23be4b977cebf433aaf2f55ad62d
|
| 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 Sep 1, 2026.
Transparency logSecurity for envstamp 0.1.2
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for envstamp-0.1.2.tar.gz
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 Sep 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.