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.5.tar.gz
(2.0 MB
view hashes)
Built Distributions
pyzsync-1.2.5-cp39-none-win_amd64.whl
(273.6 kB
view hashes)
Close
Hashes for pyzsync-1.2.5-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e193fef4e09d18d5b0b495f98f7063339a338952b16f246555623d94390b2b8 |
|
MD5 | 3a2eac35a048471708fdc1caf4ed5038 |
|
BLAKE2b-256 | 29fa123e22a958dac077375b271bb290d7a9cdd0ce219c56b28e455f5f6e4f4e |
Close
Hashes for pyzsync-1.2.5-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c72bd57660bdd66f467a9e29ee42479a81af5cbe8dd2dd00e5f248c3f848aaed |
|
MD5 | 635d083b4cd10edd490341b545fdaf3d |
|
BLAKE2b-256 | 842f3415911ba4ecc2010d1c300f8b6cf6ae51a97ea2c01fe4a5b96e10a5127c |
Close
Hashes for pyzsync-1.2.5-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b918a7adf287edf7832bbfb2e66550e230cf5825fdc889ba49e8348d932533f |
|
MD5 | a76200a124f93ba701889bbe76bb4199 |
|
BLAKE2b-256 | bd95867f5667fcbbba8726a70b7515d229f617f130272abcb2c7983b2e8215d9 |
Close
Hashes for pyzsync-1.2.5-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90461304f6e093daa3e52f1b15de1262b5b6488d8e64e634ce68b9405255607c |
|
MD5 | df0ebfc65fb76797059b0bc0314618ef |
|
BLAKE2b-256 | f5d73c9c0d7017d31073f922d9f0495344adf43d116cd8041c93a83062e4fcf3 |
Close
Hashes for pyzsync-1.2.5-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09c26a86012d05332499260708090fb47ac6223d44609b353392136c7e6e6ff5 |
|
MD5 | 096964be94048c3f36310aa1fbe9c9c1 |
|
BLAKE2b-256 | 726316ad1924c924d901a05d61c42b1014d86c35145a6c4dccf79789083a6d89 |
Close
Hashes for pyzsync-1.2.5-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aad3cd78ef6df9ea9b8753f93795bb0804b712a86b943c14f7a7124c99f5e5e3 |
|
MD5 | d4a0335b76471ffc7b53e32bcc0ed59e |
|
BLAKE2b-256 | e84edb79554200f8125d3854916addd391aaaf645f5604b8f745e6e5b406490e |
Close
Hashes for pyzsync-1.2.5-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ef3ed10d8245d7b890cc4eed9062d2c0bac0c9d92bd652dea1dea02e9958568 |
|
MD5 | 690d0a6356ba67b797a379fb248c7c6e |
|
BLAKE2b-256 | 8dc87d9b2174d66ec2daa616885ad1e521ccd179c6c6e0c92bf6dd269cb5f737 |
Close
Hashes for pyzsync-1.2.5-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d653d229a9105440cc50c41d17a4bae5166912d267dd90ed80cfe5546354f6d |
|
MD5 | 59e6adbc47f512b8401840abfedbc9bd |
|
BLAKE2b-256 | c4a5cff8e1889079e0c61a1653c8f678c5162c0b4fd9d90e1a5098e63169c58f |
Close
Hashes for pyzsync-1.2.5-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d1b3e3f438fe6e2b56219d335160ed9780f4d04a95a55440d4826b04ed64700 |
|
MD5 | 6c01313d5db60f1d70f3b3ef561da0ae |
|
BLAKE2b-256 | 08e236c9ba6597f44da037b689c2e115536da00d8f7a533926236ecc1d5401b9 |
Close
Hashes for pyzsync-1.2.5-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9a0620557be435111c368e1e41cd277a157f7479464230c48bfd73158504bd7 |
|
MD5 | d01e4388c14439abe826ef2d2b486d0f |
|
BLAKE2b-256 | 0fc6d923b17d4d6504bddec02bfe2f31ed10aa5b4387b3b8963672ccee932b90 |
Close
Hashes for pyzsync-1.2.5-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1060d569a07f710faf213e62615e677186f35a508d9f6234791fdcc7e3b3a366 |
|
MD5 | 1bc13e355074650a5cf9e9aa8db5ec50 |
|
BLAKE2b-256 | 88a202880630b0b363e2db3d8080cdb559d3ae66e38e9508958b0ff4ef1f7438 |
Close
Hashes for pyzsync-1.2.5-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7bfeb89dd3afc5e5a8475a88f6dd83b90226eef3d45c32f398495440f6a8c2d |
|
MD5 | ad5a6c3da0953f6807e083f26d182056 |
|
BLAKE2b-256 | 36a6ec79684c7abd6f9d880c466b638c9e7140325fe6adce50916f08f95016c7 |