Popular recipes tagged "persistent"http://code.activestate.com/recipes/tags/persistent/popular/2011-09-06T20:01:46-07:00ActiveState Code RecipesPersistent dict with multiple standard file formats (Python)
2011-09-06T20:01:46-07:00Raymond Hettingerhttp://code.activestate.com/recipes/users/178123/http://code.activestate.com/recipes/576642-persistent-dict-with-multiple-standard-file-format/
<p style="color: grey">
Python
recipe 576642
by <a href="/recipes/users/178123/">Raymond Hettinger</a>
(<a href="/recipes/tags/dbm/">dbm</a>, <a href="/recipes/tags/dictionary/">dictionary</a>, <a href="/recipes/tags/persistent/">persistent</a>, <a href="/recipes/tags/shelve/">shelve</a>).
Revision 10.
</p>
<p>dbdict: a dbm based on a dict subclass.</p>
<p>On open, loads full file into memory.
On close, writes full dict to disk (atomically).
Supported output file formats: csv, json, and pickle.
Input file format automatically discovered.</p>
<p>Usable by the shelve module for fast access.</p>