There are many option for persisting data, one easy way is using shelve
You can save data using:
>>> import shelve
>>> data = {'foo':'foo value'}
>>> d = shelve.open('myfile.db')
>>> d['data'] = data
>>> d.close()
Then you can recover your data easily:
>>> import shelve
>>> d = shelve.open('myfile.db')
>>> data = d['data']
>>> d.close()
Other options are using files, CPickle databases like SQLite, MySQL, etc