In a previous article I wrote about some research I did on Python modules that could provide me with a persistent storage solution for dictionaries. I didn't quite find what I needed especially as none of the modules provided a thread safe solution. In the end I decided to write my own.
Thread safe, SQLite backed persistent storage
The module I wrote,
persistentdict, is is freely available on my
website along with some notes and examples. It also has a fairly extensive test suite. It provides a single class
PersistentDict that behaves almost exactly like a native Python
dict but stores its keys and values in a SQLite table instead of keeping it in memory.