Skip to main content

ResourceSync library and client

Project description

Build status Test coverage

resync is a ResourceSync client and library in python. ResourceSync is a synchronization framework for the web consisting of various capabilities that allow third party systems to remain synchronized with a server’s evolving resources. The capabilities can be combined in a modular manner to meet local or community requirements.

Client usage

Typical client usage to synchronize from a source at http://source.example.com/ to a set of local files would be:

resync http://source.example.com/

which will create or update a local directory ./source.example.com. Alternatively, the destination directory may be specified explicitly:

resync http://source.example.com/ /tmp/my_copy

Option details and a number of different modes are described with:

resync -h

Library usage

Typical library use in a source (create and output a Resource List):

from resync import Resource,ResourceList

rl = ResourceList()
rl.add( Resource('http://example.com/res1', lastmod='2013-01-01') )
rl.add( Resource('http://example.com/res2', lastmod='2013-01-02') )
print rl.as_xml()

Typical library use in a destination (get and examine a Capability List):

from resync import CapabilityList

# Read Capability List and show supported capabilities
cl = CapabilityList()
cl.read("https://raw.github.com/resync/resync/1.0/resync/test/testdata/examples_from_spec/resourcesync_ex_2_6.xml")
for resource in cl:
    print "supports %s (at %s)" % (resource.capability,resource.uri)

Installation

The client and library are designed to work with Python 2.6, 2.7, 3.4, 3.5 and 3.6.

Automatic installation:

easy_install resync

rsync is listed in PyPI and can be installed with pip or easy_install.

Manual installation from github:

cd /tmp
git clone git://github.com/resync/resync.git
cd resync/
python setup.py build
sudo python setup.py install

This will install the library code in the appropriate place within your python setup, and the client resync in an appropriate system path (perhaps /usr/local/bin or /usr/bin depending on your system).

The source code is maintained on Github and there may be branches/versions available there that are not yet packaged for PyPI.

See also

ResourceSync simulator

Contributors

Thanks to: Bernhard Haslhofer, Robert Sanderson

See also CONTRIBUTING.md

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

resync-1.0.6.tar.gz (58.5 kB view details)

Uploaded Source

File details

Details for the file resync-1.0.6.tar.gz.

File metadata

  • Download URL: resync-1.0.6.tar.gz
  • Upload date:
  • Size: 58.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for resync-1.0.6.tar.gz
Algorithm Hash digest
SHA256 fbbc01dd6ab9bcda86ea96454834a67ef03de5b61953a8e4cc2af4cc53c2a049
MD5 8cfdc177fa9e21231df6f20d284ac410
BLAKE2b-256 d04eec168df60f43aebc4b77bc0bc052e89260ae5467def55d50685a35fac734

See more details on using hashes here.

Supported by

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