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 clippy
cargo clippy
# 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.3.0.tar.gz
(2.0 MB
view hashes)
Built Distributions
pyzsync-1.3.0-cp39-none-win_amd64.whl
(276.2 kB
view hashes)
Close
Hashes for pyzsync-1.3.0-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd3a67b2741673b69bbe01bf70564e14b32100f3e0d7ba5ed823cadde05bbb9d |
|
MD5 | b6d5fe68ef9be2d3e9b3f4b22081c6d6 |
|
BLAKE2b-256 | 25a84803121d68ae70e224988fae9868f306386867f3ec1858f7066f119d54e3 |
Close
Hashes for pyzsync-1.3.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f0302b260ebdc87134c1a2353de1d4a3adfe2eaae476619bf6dccb96c94c758 |
|
MD5 | b588ec9e2ff0af4cb52a0ee4118595fb |
|
BLAKE2b-256 | a01c4e4b0f11e88bf02d07191849ea167bbc459ea64cfc9d1013ff8ee118df85 |
Close
Hashes for pyzsync-1.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f4677146791dc557090713540e8703db6775857033466f3cdac0bc9ed1e8c2c |
|
MD5 | 5004a184c3e0ddb4b5fea34bf2a78c3d |
|
BLAKE2b-256 | b45f6040803b2e8498670697fd43907d68be212a9663f5db83641fc89657f46e |
Close
Hashes for pyzsync-1.3.0-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b4ee2b9ab5d91af2ecce837e08dddf3f8894d94a5e774a348a3dbed0abd10df |
|
MD5 | 8051941079ad67d051147d3b6bc6ff67 |
|
BLAKE2b-256 | fb7d9020980eb6b6b58ec392cd0013a73eb43d88cada5eda6c1a97bfbd8d8dc6 |
Close
Hashes for pyzsync-1.3.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8176085fee2dcbc49f45fa1bb17759f2d844999b3e806ec2b9ff421064e8b9d |
|
MD5 | 7e2d6fc778fba8c45fb8b2c3aa75a585 |
|
BLAKE2b-256 | 6b6e9191845b1add654d7d8404fc8cbfec1a02bb440344b0599fc6a42538c10c |
Close
Hashes for pyzsync-1.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6135a542ccac8b464f1dd90ca082e35cc646f457d28e5ae11378f3d82793ca8d |
|
MD5 | e6eef22e3c980c1e5aee347b3ebadf01 |
|
BLAKE2b-256 | acdb09ae076db2c68743c86b530f4618dc6b00880a122d2ba0d42aed83bbcb75 |
Close
Hashes for pyzsync-1.3.0-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c027adaa7acc376a9facbd05a2e343df165b020065193980b90d67cccd753931 |
|
MD5 | 11e838e74cbbff632b1812ac2ebaa512 |
|
BLAKE2b-256 | af2190e0e79d1fc0b11b650bd24aae69c761014c80dad32de5955a8757f43f67 |
Close
Hashes for pyzsync-1.3.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00ffe4d577625023263c4708dba19fa7af59eec79aba091f12858db20df51585 |
|
MD5 | 358aa04055f6343d9aba3c974a298478 |
|
BLAKE2b-256 | 3ff6e2a4b4d434aeeec35bdcdb3c6f111e710f8f53d837635749a1f3fbe42d36 |
Close
Hashes for pyzsync-1.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ca74f58cd29bb7151ed35175ab0fc7c13d04f4ce2ef0e8cb128cdd1536ef66e |
|
MD5 | 51fe071e9d0788c92b87b7e8c9018144 |
|
BLAKE2b-256 | 34a323ea0505bd5a5b875e6a7ed7d9628321ef50c217e3bd073a5759010895f4 |
Close
Hashes for pyzsync-1.3.0-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a294f99ec380b9f136cc6c2c879b842cd51984126e04db00ed9f676569d43ff |
|
MD5 | b86f7e00b8c9f2ef305156a9eb949023 |
|
BLAKE2b-256 | 71818675698265bba16a295ae99ec0fc030ae2d1b6630aa6c0e56168cac999c7 |
Close
Hashes for pyzsync-1.3.0-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 900753d2f4556411c3f849c8cdb5403675e085934045b1e0a5a0c5b05350bcaa |
|
MD5 | e437e873d3d10412a7f2a5726ec2b60f |
|
BLAKE2b-256 | 1cbdc07e33d64979dd2bb2cf517c208d2f77c541799f1be6b568fb58692da272 |
Close
Hashes for pyzsync-1.3.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7d0489aa395d0432a9b8289f903482e313d05e364586c942f3c7de99371f6be |
|
MD5 | bf10321d1a248397edf6849c75727068 |
|
BLAKE2b-256 | 80b60d1cab65de0323fde027fab07236d2e040f5dc724ac0f123607ffbfd843b |