Skip to content

mgwilliams/kvgit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kvgit

kvgit is a git backed key/value store. It implements a dictionary-like interface, and supports rollback.

A remote can be configured, to which commits will be pushed.

kvgit.bucket.Bucket can be passed a remote url, to which commits will be pushed; serialization functions may be passed as well.

Example Usage

import kvgit.bucket


bucket = kvgit.bucket.Bucket('/tmp/test', author=('Bob', 'bob@test.com'))

bucket['foo'] = 'bar'
bucket['bar/baz'] = 'biz'

print bucket['foo']
# 'bar'

print bucket['bar']
# raises KeyError

bucket.get('bar')
# None

bucket.commit(message='test commit')

bucket['foo'] = 'foo'
bucket.rollback()

bucket['foo']
# 'bar'

About

git backed key/value store

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%