Hash file or directory recursively.
Python bindings to the Rust paq library.
Powered by blake3 cryptographic hashing algorithm.
The Go programming language repository was used as a test data source (157 MB / 14,490 files).
| Tool | Version | Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|---|---|
| paq | latest | paq ./go |
99.5 ± 0.7 | 98.6 | 101.6 | 1.00 |
| b3sum | 1.5.1 | find ./go ... b3sum |
314.3 ± 3.9 | 308.9 | 320.8 | 3.16 ± 0.04 |
| dirhash | 0.5.0 | dirhash -a sha256 ./go |
565.1 ± 5.8 | 558.7 | 572.3 | 5.68 ± 0.07 |
| GNU sha2 | 9.7 | find ./go ... sha256sum |
752.0 ± 60.7 | 683.2 | 817.1 | 7.56 ± 0.61 |
See paq benchmarks documentation for more details.
pip install paqpyNot recommended due to instability of main branch in-between tagged releases.
- Clone this repository.
- Run
pip install maturinto install maturin. - Run
maturin develop --releasefrom repository root.
import paqpy
source = "/path/to/source"
ignore_hidden = True # .dir or .file
source_hash = paqpy.hash_source(source, ignore_hidden)
print(source_hash)Visit the paq homepage for more details.