Shelve

Shelve is a module used to store objects in a file. It uses the Pickle module as a help.

Usage
Shelve is really easy to use! Now you've got something very similar to a dictionary, although keys can only be strings. To access data use something like this: Then to save it, it's just like a dict: Finally, when you are finished call the close function:

Using sync
When you're wanting to write-back to the file in case your program is killed or crashes, you can use the sync function. To activate it, you need to change the creator like this: Then just use the sync function when you want to save: Simple!