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.5.tar.gz (14.8 kB view details)

Uploaded Source

File details

Details for the file jsongit-0.0.5.tar.gz.

File metadata

  • Download URL: jsongit-0.0.5.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jsongit-0.0.5.tar.gz
Algorithm Hash digest
SHA256 20f07e92a5101264d3f1c45dac7418933d7397ac3b5920dd1c8b3fcabe6f7cea
MD5 66a50c6be912ec114a9d3abca0751893
BLAKE2b-256 1f3bb7c6836ffcfb1c7d3962d79ca356f71bcf56fcb2f5fd657cc7d1f4d8a211

See more details on using hashes here.

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