项目作者: 631068264

项目描述 :
Persistent dict, backed by sqlite3 and pickle
高级语言: Python
项目地址: git://github.com/631068264/stash.git
创建时间: 2018-07-12T08:53:12Z
项目社区:https://github.com/631068264/stash

开源协议:

下载


Stash

persistent dict, backed-up by SQLite and pickle. Support py2.7 or py3.x

Recommend:

Keys are arbitrary strings,values arbitrary pickle-able objects.

Usage:

pip install six for Python compatibility

I use this to save program running state or data in memory when the program stop accidentally

  1. stash = Stash('sss.sqlite', table_name='ss')
  2. stash["foo"] = "fuck"
  3. stash['和谐'] = '健康'
  4. del stash["foo"]
  5. del stash["15"]
  6. del stash['和谐']

More usage refer to stash.py

Features

  • Use cPickle with the highest protocol for Values
  • Support for multiple tables in the same database file.

Inspire