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 details)
Built Distributions
File details
Details for the file simple_rsync-1.0.1.tar.gz
.
File metadata
- Download URL: simple_rsync-1.0.1.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52cea34a95724202398d6e43865227f68bdf027b08b0a496074d999ba2f6b40c |
|
MD5 | 0f745c920bf5a7d0cafeee710c952fd0 |
|
BLAKE2b-256 | f639789fe3f2b71f7c39089493e9b2a3acb43b46e5d539418c8845d3035d7f01 |
File details
Details for the file simple_rsync-1.0.1-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: simple_rsync-1.0.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 138.9 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb1eaa2b6b1a43e2d5b83fa3d108d6fcbb9d929053ecb098678e1bf46d13f5f3 |
|
MD5 | 71145e6a7c07570f492bc08de5ae1776 |
|
BLAKE2b-256 | 2412c7e2f499bc90875e1adf48dd44ea2876985d7e677761e6bbeb20a17154c7 |
File details
Details for the file simple_rsync-1.0.1-cp312-cp312-macosx_10_13_universal2.whl
.
File metadata
- Download URL: simple_rsync-1.0.1-cp312-cp312-macosx_10_13_universal2.whl
- Upload date:
- Size: 499.6 kB
- Tags: CPython 3.12, macOS 10.13+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 156280aed3aa749236310fca373ee0a505d3ce6d10f9cc9861f33ebbf706dd1a |
|
MD5 | 9a4940d098d01cd094c4ce95e8fb1129 |
|
BLAKE2b-256 | 53410bb4d1f15c1bacff0d74c0542fda6291ea9740e727dcd67a6af1ea98e063 |