This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A Python module which implements rsync with SHA256 hash.

Project Description

pyrsync is a Python module which implements the [rsync algorithm] [1], written in pure Python. It is not a wrapper for rsync, but a set of functions which apply full rsync functionality through Python.

The original rsync specification calls for the use of an MD5 hash, which the developers of this module considers to be outdated, and thus all occurences of MD5 have been replaced with SHA256. Personally, I would opt for using SHA512, but this would double the storage size for hash table databases. SHA256 is sufficient to meet standard security requirements for verification processes as of this release, although, eventually, added functionality for the user/developer to choose between various hashes should be considered for further releases.

The majority of the code for this module is taken from [Eric Pruitt’s post at ActiveState] [1]. It was orginally licensed under an [MIT license] [2], and this license has been kept wthout modifications.

## Installation

If you have [setuptools] [3] installed, simply do:

$ sudo python install

If you do not have setuptools, the script will detect this and default to using the python builtin distutils. To install using distutils, the installation process is the same as documented above for setuptools.

## Use

An example use case for this module:

# On the system containing the file that needs to be patched >>> import pyrsync >>> unpatched = open(“unpatched.file”, “rb”) >>> hashes = pyrsync.blockchecksums(unpatched)

# On the remote system after having received hashes >>> import pyrsync >>> patchedfile = open(“patched.file”, “rb”) >>> delta = pyrsync.rsyncdelta(patchedfile, hashes)

# System with the unpatched file after receiving delta >>> >>> save_to = open(“locally-patched.file”, “wb”) >>> pyrsync.patchstream(unpatched, save_to, delta)

[1]: “Andrew Tridgell and Paul Mackerras. The rsync algorithm. Technical Report TR-CS-96-05, Canberra 0200 ACT, Australia, 1996.” [2]: “Rsync Algorithm (Python Recipe)” [3]: “OSI MIT License”

Release History

Release History

This version
History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyrsync-0.1.0.linux-x86_64-py2.6.exe (72.8 kB) Copy SHA256 Checksum SHA256 any Windows Installer Jan 27, 2012
pyrsync-0.1.0.tar.gz (4.8 kB) Copy SHA256 Checksum SHA256 Source Jan 27, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting