Skip to main content

Journaling dbm

Project description

Journaling dbm

Allowed backends

  • ‘memory’ (mostly for tests)

  • ‘tc’ (tokyo cabinet)

Usage

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

Standard operations:

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

Restore db from journal:

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

Project details


Release history Release notifications | RSS feed

This version

1.0

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 details)

Uploaded Source

File details

Details for the file jdbm-1.0.tar.gz.

File metadata

  • Download URL: jdbm-1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jdbm-1.0.tar.gz
Algorithm Hash digest
SHA256 f833f6c00675bc6bdaa8d89e88bb117acdea6a2017e354122009648fc3295784
MD5 a4b4673e4d5d4ba575c63df91e58b2ad
BLAKE2b-256 696923905abd2ba6a530534bf1f4190f6e73acdfe67953ae216f51236e743e77

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page