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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for jsongit-0.0.4.tar.gz
Algorithm Hash digest
SHA256 98864b36c1b34c039a959de4aba5676b2e84c0cbf7f3eb0587fdced2ef8beef6
MD5 003e7313da484af0b4a449f7ba7ad6f2
BLAKE2b-256 d97133025b75d97f234b22e66612608233bd40e54999e4fc0d2a77681a0d778b

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