py-leveldb 介绍
py-leveldb 是 Google 的 K/V 数据库 LevelDB 的
Python 客户端开发包。
示例代码:
import leveldb db = leveldb.LevelDB('./db') # single put db.Put('hello', 'world') print db.Get('hello') # single delete db.Delete('hello') print db.Get('hello') # multiple put/delete applied atomically, and committed to disk batch = leveldb.WriteBatch() batch.Put('hello', 'world') batch.Put('hello again', 'world') batch.Delete('hello') db.Write(batch, sync = True)
py-leveldb 官网
http://code.google.com/p/py-leveldb/
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。