Simple Python interface for librsync
Project description
Simple Python interface for librsync
Install
pip install simple-rsync
Build
- Make sure Rust toolchain is installed. If not goto https://rustup.rs/ to install it.
- Create an virtual environment and run:
python setup.py develop
for develop build orpython setup.py bdist_wheel
for release build
Verify
python setup.py test
Use
from simple_rsync import signature, delta, patch
base_file = "base"
new_file = "new"
signature_file = "sig"
delta_file = "delta"
result_file = "result"
signature(base_file, signature_file, block_len=1024, strong_len=8)
delta(new_file, signature_file, delta_file)
patch(base_file, delta_file, result_file)
with open(new_file, "rb") as expected:
with open(result_file, "rb") as result:
assert expected.read() == result.read()
For OS specific instructions see the mac
and windows
folders.
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
simple_rsync-1.0.1.tar.gz
(7.5 kB
view hashes)
Built Distributions
Close
Hashes for simple_rsync-1.0.1-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb1eaa2b6b1a43e2d5b83fa3d108d6fcbb9d929053ecb098678e1bf46d13f5f3 |
|
MD5 | 71145e6a7c07570f492bc08de5ae1776 |
|
BLAKE2b-256 | 2412c7e2f499bc90875e1adf48dd44ea2876985d7e677761e6bbeb20a17154c7 |
Close
Hashes for simple_rsync-1.0.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 156280aed3aa749236310fca373ee0a505d3ce6d10f9cc9861f33ebbf706dd1a |
|
MD5 | 9a4940d098d01cd094c4ce95e8fb1129 |
|
BLAKE2b-256 | 53410bb4d1f15c1bacff0d74c0542fda6291ea9740e727dcd67a6af1ea98e063 |