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
>>> r.show('foo')
{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
'bar'='{}'@5bb29ad7dc
'foo'='{u'roses': u'red'}'@dbde44bada
'foo'='{}'@5d55214e4f

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for jsongit-0.0.7.tar.gz
Algorithm Hash digest
SHA256 4354af4ecd48b856655a6c74accfe13427db35cbae54656c9cf19718fe8a085a
MD5 c5a8d2bfcf693e0915e33339b3bc9163
BLAKE2b-256 5ae5b068d3e1401aff91e60a45b2e0da4876fd631e5de79094ae91be6e1f2bd9

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