Skip to main content

Simple Python interface for librsync

Project description

Simple Python interface for librsync

Build

  1. Make sure Rust toolchain is installed. If not goto https://rustup.rs/ to install it.
  2. Create an virtual environment and run: python setup.py install

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()

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-0.3.0.tar.gz (7.1 kB view hashes)

Uploaded Source

Built Distributions

simple_rsync-0.3.0-py3.9-macosx-10.9-x86_64.egg (221.8 kB view hashes)

Uploaded Source

simple_rsync-0.3.0-cp310-cp310-win_amd64.whl (133.1 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

simple_rsync-0.3.0-cp310-cp310-macosx_10_9_universal2.whl (245.1 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

simple_rsync-0.3.0-cp39-cp39-win_amd64.whl (496.0 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

simple_rsync-0.3.0-cp39-cp39-macosx_10_9_x86_64.whl (225.4 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

simple_rsync-0.3.0-cp38-cp38-win_amd64.whl (128.7 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

simple_rsync-0.3.0-cp38-cp38-macosx_10_9_x86_64.whl (446.5 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

simple_rsync-0.3.0-cp37-cp37m-win_amd64.whl (373.5 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

simple_rsync-0.3.0-cp37-cp37m-macosx_10_15_x86_64.whl (417.0 kB view hashes)

Uploaded CPython 3.7m macOS 10.15+ x86-64

simple_rsync-0.3.0-cp37-cp37m-macosx_10_9_x86_64.whl (211.6 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page