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.2.6.tar.gz
(1.9 MB
view hashes)
Built Distributions
pyzsync-1.2.6-cp39-none-win_amd64.whl
(271.0 kB
view hashes)
Close
Hashes for pyzsync-1.2.6-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c98c274f9ebe806a12b1eb11d45e3f20289822959be7c214cdd1cf475b10c7c6 |
|
MD5 | 7e72a77e933cc11d8a92ec624d0e2475 |
|
BLAKE2b-256 | 17bee413e8e4728b9bc90be40ef9eb46bfc37e3eff1f979edd1fa485883d5294 |
Close
Hashes for pyzsync-1.2.6-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f967a677dd7c95304b7e118b240208041fdf160b27ecd34b59f9c47d755ff546 |
|
MD5 | 225144fd119c9289c63aa0b2c321008e |
|
BLAKE2b-256 | 0771cd59b3f053e90ee29ca11ce0ac9f65d1de90d2ffcc155bf88b0a729e337e |
Close
Hashes for pyzsync-1.2.6-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bc7ff81c8a9fa7e894abf568fdde1b768e206413816cd7ef7a00978c386e7cc |
|
MD5 | 666144dce86bc5ed929d21a0d06c1421 |
|
BLAKE2b-256 | f472e4a4cf3d8904d0bef8434ecd8d3912ea5a48d2bcf64429e0f3040672e7d7 |
Close
Hashes for pyzsync-1.2.6-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b75f031516d70f5b41c85041b1a26e897720e885c5a199886dcdf5b7c583185 |
|
MD5 | 7748b61c8f85c11b832a4574c3d9de9d |
|
BLAKE2b-256 | 8f2cf7dbfe159ef94212bda1ab42ad7cd2fd0961ed30a9505148d20b8ea0dc81 |
Close
Hashes for pyzsync-1.2.6-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fb66827c6b389cd4b82c0c7bc105e328c1ecc71aa459724bdab784d1abe6f6a |
|
MD5 | 1d023ecf40f2901e132b75d215b8163e |
|
BLAKE2b-256 | 08e26bcfb05aae609bb3c65288bbefe4c317d26c5d99048627794cd90eca40de |
Close
Hashes for pyzsync-1.2.6-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02966688f31de8ed268ac44b32483fe680ff5d13d471fb1247575e4ab0a99ec7 |
|
MD5 | e19d7fcaa9e67eda2364a3a4dd5fca71 |
|
BLAKE2b-256 | b46c262f486dfb5358b7f5fd48c1a102124a6a905e0d2ff407048a67ecb0f657 |
Close
Hashes for pyzsync-1.2.6-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e36cacc9d79b030e4afbd78c75e83b5dfcea89b0425be4e9e403c929d53bfcd8 |
|
MD5 | 467df5b67bd5d4c36f5a35b1febd8043 |
|
BLAKE2b-256 | 60fee41d5b6a141015c8170fb8d362afd28a2d4925d20354f6abe95be8338d5d |
Close
Hashes for pyzsync-1.2.6-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f00f9217ab5ced0929d4a7be2c9f8608e6fa12181744ff8e8c584928b006b15 |
|
MD5 | 18c5878a9bfbd02e5b28f759395604d0 |
|
BLAKE2b-256 | 77185216ab0e6b60c694a89130c7e63788e3259eac83e93e9e9783c6f59d50da |
Close
Hashes for pyzsync-1.2.6-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84e6e1da1a2b771e4631fa37c17dab01af8efb3b5d6d671c0f4005c74f3d8d01 |
|
MD5 | c59154ee8cb8d1a3ce67ca0618281cbd |
|
BLAKE2b-256 | 7052894ea828458cc4bdbdeb4c87756581da4aff6cb1c5feb88d1293f0dc5219 |
Close
Hashes for pyzsync-1.2.6-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df5f8a575e0749b06aac573b4687657a67a9eca0f34fd409267b7eb27f8442e2 |
|
MD5 | b863f1c8a6b1a8d5b51beb7acb0bc12e |
|
BLAKE2b-256 | 6920c09bc317abad3e278c1d815d41ca468241413b7d675266e2fd8e494041bb |
Close
Hashes for pyzsync-1.2.6-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 307d69f561121820c7379b88b6bddf9e02b5c9b71e17a7a72550355a4dfef17c |
|
MD5 | 9df61704a75e72f1caeb54a5a100310d |
|
BLAKE2b-256 | 8bfe3f1862b416f0617201f8980a268e928ac806bf46881503cf9be77a33e1d2 |
Close
Hashes for pyzsync-1.2.6-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1fed019ac4dd3b25b19828533a761bc92f48c8054c9df559104ff4b360632c1 |
|
MD5 | fe62b9fdda71d260b9cdc9c4d49e012f |
|
BLAKE2b-256 | 0d14894ffd36a96e00a4c7c24b45210428aa1afc339a6c12ca8cdf459cb42c1d |