Note: The dumbdbm module is intended as a last resort fallback for the anydbm module when no other more robust module is available. The dumbdbm module is not written for speed and is not nearly as heavily used as the other database modules.
The dumbdbm module provides a persisten dictionary-like interface which is written entirely in Python. Unlike other modules such as gdbm and bsddb, no external library is required. As with other persistent mappings, the keys and values must always be strings.
The module defines the following:
filename[, flag[, mode]]) |
Open a dumbdbm database and return a dumbdbm object. The filename
argument is the basename of the database file (without any specific
extensions). When a dumbdbm database is created, files with .dat
and
.dir
extensions are created.
The optional flag argument is currently ignored.
The optional mode argument is the Unix mode of the file, used
only when the database has to be created. It defaults to octal
0666
.