Skip to main content

Git for JSON

Project description

git your dict

Use Git as a key-value store that can track and merge arbitrary data in Python:

>>> r = jsongit.init('repo')
>>> foo = r.commit('foo', {})
>>> bar = r.merge('bar', 'foo').result
>>> foo['roses'] = 'red'
>>> bar['violets'] = 'blue'
>>> foo.commit()
>>> bar.commit()
>>> foo.merge(bar).message
u'Auto-merge from ee0badced484570b36bb219ad81567098e9995a7'
>>> foo.value
{u'roses': u'red', u'violets': u'blue'}
>>> log = foo.log()
>>> pprint([commit.object.value for commit in log])
[{u'roses': u'red', u'violets': u'blue'},
 {u'violets': u'blue'},
 {},
 {u'roses': u'red'},
 {}]
...

Installation

Libgit2 is used to build and modify the git repository. You can find instructions for installing it here.

Pip handles the rest:

$ pip install jsongit

You can find full installation instructions in the documentation.

Documentation

Documentation is on Read the Docs.

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

jsongit-0.0.3.tar.gz (13.6 kB view hashes)

Uploaded Source

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