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')
>>> r.commit('foo', {})
>>> r.checkout('foo', 'bar')
>>> r.commit('foo', {'roses': 'red'})
>>> r.commit('bar', {'violets': 'blue'})
>>> r.merge('foo', 'bar').message
Auto-merge of be92d3dcb6 and dbde44bada from shared parent 5d55214e4f
{u'roses': u'red', u'violets': u'blue'}
>>> for commit in r.log('foo'):
...     print(commit)
'foo'='{u'roses': u'red', u'violets': u'blue'}'@fc9e0f3106
'bar'='{u'violets': u'blue'}'@be92d3dcb6
'foo'='{u'roses': u'red'}'@dbde44bada


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

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page