Skip to main content

Simple, transparent on-disk JSON store

Project description

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.

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

mrjsonstore-0.3.0.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

mrjsonstore-0.3.0-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

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