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
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)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f833f6c00675bc6bdaa8d89e88bb117acdea6a2017e354122009648fc3295784
|
|
| MD5 |
a4b4673e4d5d4ba575c63df91e58b2ad
|
|
| BLAKE2b-256 |
696923905abd2ba6a530534bf1f4190f6e73acdfe67953ae216f51236e743e77
|