Persistent dict, backed by sqlite3 and pickle
Stash
persistent
dict
, backed-up by SQLite and pickle. Support py2.7 or py3.x
Keys are arbitrary strings,values arbitrary pickle-able objects.
pip install six
for Python compatibility
I use this to save program running state or data in memory when the program stop accidentally
stash = Stash('sss.sqlite', table_name='ss')
stash["foo"] = "fuck"
stash['和谐'] = '健康'
del stash["foo"]
del stash["15"]
del stash['和谐']
More usage refer to stash.py
cPickle
with the highest protocol for Valuesshelve
and mix sqlite3
dict
mix sqlite3
and pickle