Skip to main content

Journaling dbm

Project description

Journaling dbm

Allowed backends

  • ‘memory’ (mostly for tests)

  • ‘tc’ (tokyo cabinet)


>>> from jdbm import jdbm
>>> db = jdbm('tc', filename='var/',
...     journal_filename='var/')

Standard operations:

>>> db.put('a', 'foo')
>>> db.put('b', 'bar')
>>> db.get('a')
>>> set(k for k in db)
set(['a', 'b'])
>>> db.exists('a')
>>> db.delete('a')
>>> db.length()

Restore db from journal:

>>> db.clear(journaling=False)
>>> db.length()
>>> db.restore_from_journal()
>>> db.length()

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jdbm-1.0.tar.gz (2.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page