Fast persistent dictionary

Tim Lavoie tool_man at
Fri Oct 4 21:30:10 CEST 2002

>>>>> "OP" ==   <original poster> writes:

    OP> I need a fairly fast and simple persistent dictionary for use
    OP> in a Python program. I'll only store two string values for
    OP> each key (a string also). It's important that the contents of
    OP> the dictionary are saved to disk as soon as possible so to
    OP> survive system failures in a consistent state.

How about the shelve module? It seems to be quick, and puts the
contents into a DBM-style database file. The values inserted are
arbitrary Python objects, as long as they can be pickled.

Of course power tools and alcohol don't mix.  Everyone knows power
tools aren't soluble in alcohol...
                -- Crazy Nigel

More information about the Python-list mailing list