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.2.tar.gz
(2.0 MB
view hashes)
Built Distributions
pyzsync-1.2.2-cp39-none-win_amd64.whl
(273.6 kB
view hashes)
Close
Hashes for pyzsync-1.2.2-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 705b68ea3b449dac402bfebc17dc38dbf3ca51893b2b7b5e75577696008a262b |
|
MD5 | 48160e0272208572b31108b51566f371 |
|
BLAKE2b-256 | a0b272c1b54d75e9a1ea4656866607d95d3fe6d086da7c8f03bbb3a9f7bed433 |
Close
Hashes for pyzsync-1.2.2-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d109c153340cb0446e68347d8066e508067399fa4f62353bbff71e072d3c37d |
|
MD5 | 4cf5e8cedfe22c55f1e8914deec3804d |
|
BLAKE2b-256 | 836a2a6528bd0da7ee4e4e99f78830b6a174513dc0b6e2960eb532645daa4345 |
Close
Hashes for pyzsync-1.2.2-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df264ce764c5eb6bcc3fb0b496de4fdf6cba09019840d31791352a1e7dca2aba |
|
MD5 | fd38e308ccfe3ee15e5db1b66f88be13 |
|
BLAKE2b-256 | 88bc45f893a074e4b8b51c76433b2c40d319bfce0f76b5172b7c4d8def54a1a9 |
Close
Hashes for pyzsync-1.2.2-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfaf31bb3651163c6f843999bec335f1d2429518a839ff4c197b5df5994a8797 |
|
MD5 | 134971d502a927a2d9f390f7c1744362 |
|
BLAKE2b-256 | 219f1d72fa69769ffcf267c0a4eb7575787629ec9b3140cf9d4bb55afde31564 |
Close
Hashes for pyzsync-1.2.2-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6514d7667b9f524af8741a152a800312a88d2fea6679f3cdac468d8402392d0 |
|
MD5 | 5f3f1a1da9f829174289bb0a71577662 |
|
BLAKE2b-256 | 44c0cdc907f7407e3e8d727e359715ea6dc1a1f1a75ef5f0c4b52641eeee6504 |
Close
Hashes for pyzsync-1.2.2-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbb00594d1ee7ab6c1c029da550049a0b6098591df464f439586d3e0f29c1973 |
|
MD5 | 30028a854d3354de9719d20727ac73a3 |
|
BLAKE2b-256 | 9ddc9b8f3753a74b4bd14c0085dbdff51ce2c75eea4f7b2d8778d41360b98502 |
Close
Hashes for pyzsync-1.2.2-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 193700bef479e598217e4f953aa51a148f7c007f9f99fd41ad949de334b8f1f2 |
|
MD5 | 8b6d13689d93da56fde81e8b5a6dbd45 |
|
BLAKE2b-256 | 9e1663e39dbaec5f4c3226c73028b2d5a9b9fe72ab29a4d3ea676c09a2b362da |
Close
Hashes for pyzsync-1.2.2-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 070b41cabde68d781650552cdc25a9228696e9691f9bd145a29c90ca1c92c99b |
|
MD5 | 2b0a220730bbffcc345a41593b751115 |
|
BLAKE2b-256 | 6379555c19aec8d4fd8cbb1bf10b8af0a1058c61e70af1eac40d1e811a1c0674 |
Close
Hashes for pyzsync-1.2.2-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80da8406ce90115033e1bf7639376d76a2d9eedde8326fe01c997cc7f0934e0a |
|
MD5 | 34394b1565f659de4497d1329923cc00 |
|
BLAKE2b-256 | b3c7a6487ec74f1b982d1f4366a26b93728c39ec54581b763389fd47ab0b37f5 |
Close
Hashes for pyzsync-1.2.2-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d9dc76ffff25db8fd36bd8b282c5809863916f97e820e56ab5c525fb139b8bb |
|
MD5 | fae3fdcd5d9271e94db794ba609c5aaa |
|
BLAKE2b-256 | 896a9675fdf29a8eff5cc4b80c2236cb78bdede298a95fca2c5be24e8f457b99 |
Close
Hashes for pyzsync-1.2.2-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aec95847d38fcbc04ec6fef0ea2dcddb94a5e8e48a305af1d8b72d67b725e936 |
|
MD5 | d1a93ee1923c818b8d9d978f48233511 |
|
BLAKE2b-256 | 0cb5a6b3d145f2256bc351c8a7b4a1ceadecd1ed50c8e486e9e1de5dae16cee7 |
Close
Hashes for pyzsync-1.2.2-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39ddbdaeaaf4e64f14ecfbb41e20de3ba6ebc5495286b6b842f764b62bb032ec |
|
MD5 | 5f9a0a72a0cb490eb8f5979381ba1140 |
|
BLAKE2b-256 | 56efc88ee13f9593d9347fcb8b457e5c7dc91c6d30053f4df1fa65aaa4d27317 |