首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Python > A python module similar to shelve but using an sqlite3 (or other) database as a back end.

A python module similar to shelve but using an sqlite3 (or other) database as a back end.

  • 资源大小:2.14 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: end

资 源 简 介

`pdict` is a simple module that provides a `dict`-like type called `PersistentDict` which will persist the dictionary to a database of your choice. Whenever an items is requested, added, changed, or removed, the data is read from/written to a database. The values in the dict can be an object of any type that is serializable by the `pickle` module. This is handy for when you want to save preferences, current state and other data between uses of your program. Usage is very simple, for example: ``` >>> from pdict import PersistentDict >>> cfg = PersistentDict("testfile.cfg") >>> cfg["test1"] = "testval1" >>> cfg["test2"] = "testval2" >>> print cfg {"test1": "testval1", "test2": "testval2"} >>> ``` To install the `pdict` module, just download the the tarball or checkout the source and move the `pdict` directory to somewhere accessible by Python. There should be a proper installer and/or egg in the next few revisions.

文 件 列 表

pdict
.svn
__init__.py
test.py
VIP VIP
  • 大智若愚 4小时前 成为了本站会员

  • Mason 6小时前 成为了本站会员

  • 6小时前 成为了本站会员

  • Half_Punch 1天前 成为了本站会员

  • liqing71718 1天前 成为了本站会员

  • 伟国 1天前 成为了本站会员

  • songy 1天前 成为了本站会员

  • 纯色幽默 1天前 成为了本站会员

  • odd? 1天前 成为了本站会员

  • 52JOY... 1天前 成为了本站会员

0.176970s