dohdbm module¶
Implements a dictionary-like database with a degree of persistence.
On open, we read the database into a dictionary. We mutate the dictionary in memory. Then on close, we write the dictionary back to disk.
Has the advantage of being in Pure Python, so it works on about any Python interpreter one cares to consider.
- class dohdbm.Dohdbm(filename, flag='r', mode=437, backend_open=<class 'bufsock.rawio'>)[source]¶
Bases:
object
A class implementing a simple database.
- dohdbm.open(filename, flag='rb', mode=438, backend_open=<class 'bufsock.rawio'>)[source]¶
Open a dohdbm database.
- dohdbm.safe_rename(backup_filename, regular_filename)[source]¶
Rename backup_filename to regular_filename.