A Python module written in Rust that implements the zsync algorithm
Project description
pyzsync
A Python module written in Rust that implements the zsync algorithm.
Usage
Use the Python module as a script
# Show help.
python -m pyzsync --help
# Create a zsync file.
poetry run python -m pyzsync zsyncmake bigfile
# Compare two files and show how much data from the first file
# can be used to create the second file using the zsync algorithm.
python -m pyzsync compare bigfile1 bigfile2
# Download a file using zsync.
# This will automatically use blocks from the local files
# noble-desktop-amd64.iso and noble-desktop-amd64.iso.zsync-tmp-*
# if available.
python -m pyzsync zsync https://cdimage.ubuntu.com/daily-live/current/noble-desktop-amd64.iso.zsync
Use the Python module in a script
from pyzsync import create_zsync_file
create_zsync_file("bigfile", "bigfile.zsync")
See tests/test_pyzsync.py
and pyzsync/__main__.py
for more examples.
Build / Development
Based on PyO3
# Install toolchain (linux)
rustup toolchain install beta-x86_64-unknown-linux-gnu
# Build package in debug mode and install it to virtualenv
poetry install
poetry run maturin develop --release
# Run cargo test
cargo test --no-default-features
# Run pytest
poetry run pytest -vv
# Build release package
poetry run maturin build --release
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
pyzsync-1.2.1.tar.gz
(2.0 MB
view hashes)
Built Distributions
pyzsync-1.2.1-cp39-none-win_amd64.whl
(273.6 kB
view hashes)
Close
Hashes for pyzsync-1.2.1-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49e43c22c8439d531e1b415bfb198abe2d0f2adae5dec5607de4988639b31cd0 |
|
MD5 | abf53c9923b107401f4fb6e5f4dada85 |
|
BLAKE2b-256 | 9d99f778f01a74a1421468f640fb39f93ed3f81fb5027f5789dc6ab8e2889e73 |
Close
Hashes for pyzsync-1.2.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d5750d6a98f5ba3e091a4146824fd9dfe6bc09178e076b63d2465984346e623 |
|
MD5 | e521e3117dc6d32a059f1de3e08aab87 |
|
BLAKE2b-256 | c881d47f8130195a389762bc55ab4938221fe9d7a6e086146cc9b9484bcf9845 |
Close
Hashes for pyzsync-1.2.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67923e1a89660abb23d5d8fc7c6c15c1f54f57aa316419b0ca73757e64a55b24 |
|
MD5 | 164f1b91a067362c03bc5fa86c34e06d |
|
BLAKE2b-256 | 00b4a2c6b74011d718b13d69a22214385572cc8509e96b48a1a701c0fd325b46 |
Close
Hashes for pyzsync-1.2.1-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56cbfe6b135cecd80429f049bc80b28a2030f6355c742e3a0da19b95f77ec052 |
|
MD5 | 4569df6ebeb1b8293c46d5ac04e12c43 |
|
BLAKE2b-256 | a002aecb8451cbf4961457dbc75e901abcf69cb8e7031422f3a087f280ea53ed |
Close
Hashes for pyzsync-1.2.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92b221b70d1cb6492da228eeb1203e786ee4d9b100403af73edf257a7a98b7e8 |
|
MD5 | 6a6c895393640846c99ef42182ced9cf |
|
BLAKE2b-256 | 6c7cf17dbfe2ad217a1f822a2f74076392f67b5c66787a2a5d0129fd35287568 |
Close
Hashes for pyzsync-1.2.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e505107ab9c113b169e85ab153cb32d2726c17f68f05bec61aa87948a1bce848 |
|
MD5 | 0662d4f3f10328c246bb900061626de9 |
|
BLAKE2b-256 | a32ed844ab094763ec0d269b46b2ee31ad7c1bc7590d633305a6e4e942571eb1 |
Close
Hashes for pyzsync-1.2.1-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9d98dc392fba4e63a6f7973b82d1b9e0e7a4d201e04805fd0fab369d8d4a788 |
|
MD5 | ea638f8560bfa318d0cc3e323e77efeb |
|
BLAKE2b-256 | 1c6311ef1ce812c843b1f157f3efdff10fa198c0090f5cb9b28298553b89de8f |
Close
Hashes for pyzsync-1.2.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e607df12cccebe268165e6030f0c7110aec6f86ec76619333a4ba130562996a |
|
MD5 | f0e3e26c77371f4a91f84506076c0462 |
|
BLAKE2b-256 | 6ac37f5bf94bbacd91827dac350fa93701d08bd344f3af18e5c5b92727dbbbc0 |
Close
Hashes for pyzsync-1.2.1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 734c5ec2c7ef9436db89bd5bdf8db198f19cbd59b093bc5ec56ee1ca4879059a |
|
MD5 | db6f256677b95f8db63d82f578266567 |
|
BLAKE2b-256 | aff4c179f5472b0b8ef48294a06bc3b6856fbf4db826273ee35cc53448687b59 |
Close
Hashes for pyzsync-1.2.1-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3af43c560cfd7690e3bfe42f57177588194b95a8aaa9aff1314ecfd1f9775c5f |
|
MD5 | 241fa75c92d412c25f9b445282c744ee |
|
BLAKE2b-256 | 2e0e85231907cda1397ef2e5b1de8d9a07f9bcef65d213e69c195b5f7a752707 |
Close
Hashes for pyzsync-1.2.1-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9e8a5dc8221cb152f6f693e6ae7cf03ca6bc129c9034b396133c770498fd95f |
|
MD5 | 6994de0b1f60bda58b9931bb527d22da |
|
BLAKE2b-256 | 0403033b9c927d2651fe07fc265ebdde776c4c1ef06a6e5c31ccd5e111bb77ed |
Close
Hashes for pyzsync-1.2.1-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeeca2beb04c27b326a03a2753ec35d41fc38b8d0b5003de0c068ad69026bc38 |
|
MD5 | cdcb96397fe228f5be6e52def8d49b09 |
|
BLAKE2b-256 | 179fefb757c74e68799c1290d06954ce19ae525fa93e3022116eac28cd904404 |