Skip to content

olekli/MrJsonStore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mrjsonstore

Simple, transparent on-disk JSON store using atomicwrites.

store = JsonStore('example.json')
with store() as x:
    assert isinstance(x, dict)
    x['woohoo'] = 'I am just a Python dictionary'

Changes are written on context exit, regardless of exceptions that occurred.

Unless a transaction is used:

with store.transaction() as x:
  [ ... ]
  raise RuntimeError()

In that case any changes are rolled back on context exit.

Does not yet support concurrency.

About

Simple, transparent on-disk JSON store

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages