DBLock Context Manager

Consider, for a moment, the shelve and dbm packages for storing things in a “database.” Built-in. Lightweight. The database is essentially a mapping from identifiers to objects. It can be quite nice.

The shelve module directly puts Python objects in a file. It’s an ideal database structure for Python …

more ...