Skip to content

Just a quick and dirty way to persist dictionaries, with conflict protection

License

Notifications You must be signed in to change notification settings

zauberparacelsus/fakedb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

FakeDB

Just a quick and dirty way to persist dictionaries for Python 3.2 or higher. Can persist data as either json, bson, or hjson. Conflict resolution is performed with a revision key, blocking a write if an existing document and a modified version do not have matching revision keys.

from fakedb import FakeDB

db = FakeDB()
data = {"content":"hello world!"}
db.write(data, "test")

data = db.read("test")
data["content"] = "foo bar"
db.write(data, "test")

About

Just a quick and dirty way to persist dictionaries, with conflict protection

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages