paqPy
Hash file or directory recursively.
Python bindings to the Rust paq library.
Powered by blake3 cryptographic hashing algorithm.
Performance
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 |
77.7 ± 0.6 | 77.1 | 80.2 | 1.00 |
| b3sum | 1.5.1 | find ./go ... b3sum |
327.3 ± 3.6 | 320.2 | 332.3 | 4.21 ± 0.05 |
| dirhash | 0.5.0 | dirhash -a sha256 ./go |
576.1 ± 2.9 | 570.8 | 580.3 | 7.41 ± 0.06 |
| GNU sha2 | 9.7 | find ./go ... sha256sum |
725.2 ± 43.5 | 692.2 | 813.2 | 9.33 ± 0.56 |
| folder-hash | 4.1.1 | folder-hash ./go |
1906.0 ± 78.0 | 1810.0 | 2029.0 | 24.53 ± 1.02 |
See paq benchmarks documentation for more details.
Installation
Install From PyPI
pip install paqpy
Install From Repository (Unstable)
Not 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.
Usage
import paqpy
from pathlib import Path
source = Path("/path/to/source")
ignore_hidden = True # .dir or .file
source_hash = paqpy.hash_source(source, ignore_hidden)
print(source_hash)
hash_source returns a hexadecimal hash string. File system failures raise the
corresponding Python OSError subclass, such as FileNotFoundError or
PermissionError. Invalid UTF-8 paths raise UnicodeError, invalid source
relationships raise ValueError, and other hashing failures raise
paqpy.PaqError.
Visit the paq homepage for more details.
License
Metadata
Release files for paqpy 1.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| paqpy-1.5.0.tar.gz | 9.3 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| paqpy-1.5.0-cp37-abi3-win_amd64.whl | CPython 3.7 | abi3 | Windows x86-64 | Details |
| paqpy-1.5.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.7 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| paqpy-1.5.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.7 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| paqpy-1.5.0-cp37-abi3-macosx_11_0_arm64.whl | CPython 3.7 | abi3 | macOS 11.0+ ARM64 | Details |
| paqpy-1.5.0-cp37-abi3-macosx_10_12_x86_64.whl | CPython 3.7 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 1.6 MB
Release files / paqpy-1.5.0.tar.gz
| Download URL | paqpy-1.5.0.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a70c130ba255044d33b0790952fe2e8e3eeab171834553ca41ec48872665847
|
|
BLAKE2b-256 checksum How to use checksums |
f6202ca8abe0185cee646a740f0ee9764225c80a37f590b1696e2d6a6f7656b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / paqpy-1.5.0-cp37-abi3-win_amd64.whl
| Download URL | paqpy-1.5.0-cp37-abi3-win_amd64.whl |
|---|---|
| Size | 220.7 kB |
| Tags | CPython 3.7 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
7005e361f8968830dab4a825376e06722daadfe575c5582db99fc91e72aade3a
|
|
BLAKE2b-256 checksum How to use checksums |
361521553f94cd70f5e92b769a6f5911e823ee8da0518152604d909a59dde267
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / paqpy-1.5.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | paqpy-1.5.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 375.0 kB |
| Tags | CPython 3.7 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
1074cd847c95f04e7efd45ad8e8b35c6aa6875b06403115257fc2a2027ebe2b3
|
|
BLAKE2b-256 checksum How to use checksums |
d71aeb7fe87d0621df88569cda38822a1343f4be5691d886f42483ddbf7e6af6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / paqpy-1.5.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | paqpy-1.5.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 360.6 kB |
| Tags | CPython 3.7 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
51de765db9134196b3b0a9aab3ca75bdcc4d8de2c32c2d468994fd9916bdea9b
|
|
BLAKE2b-256 checksum How to use checksums |
3fe2645111afb1bb4306d7d59e51dcffd062e5adb0dd46412f130fd8aa660960
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / paqpy-1.5.0-cp37-abi3-macosx_11_0_arm64.whl
| Download URL | paqpy-1.5.0-cp37-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 317.9 kB |
| Tags | CPython 3.7 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
53c9a1ec63f25d7953c38d74faff0d1b0c2d8219d89bf4cf3947cbac5c56e08a
|
|
BLAKE2b-256 checksum How to use checksums |
1f9c0dd9093cdf68ae62295b086c017c4b0c5db95bbb95bad70e2f7f4d78438d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / paqpy-1.5.0-cp37-abi3-macosx_10_12_x86_64.whl
| Download URL | paqpy-1.5.0-cp37-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 331.3 kB |
| Tags | CPython 3.7 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
e308f37fde73e2eb125ad8ce252b3eda6d2cbe4cc95f780f04cd96148d5dd9be
|
|
BLAKE2b-256 checksum How to use checksums |
380f142641f1cfcd1089fbb8f3d49c7c6ed54d4041a4370d7a1292458f8b6920
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|