memached数据存储实现
datastore.memcached的Python项目详细描述
#数据存储memcached
##memcached的数据存储实现
请参阅[数据存储](https://github.com/datastore/datastore)。
###安装
来自pypi(使用pip):
sudo pip install datastore.memcached
来自pypi(使用setuptools):
sudo easy_install datastore.memcached
来源:
git clone https://github.com/datastore/datastore.memcached/ cd datastore.memcached sudo python setup.py install
###许可证
datastore.memcached受麻省理工学院许可。
###联系人
datastore.memcached由[juan batiz benet](https://github.com/jbenet)编写。 它是从[数据存储](https://github.com/datastore/datastore)中提取的 2013年2月。
项目主页: [https://github.com/datastore/datastore.memcached](https://github.com/datastore/datastore.memcached)
请随时与我联系。但请先在github中提交问题。干杯!
###你好,世界
>>> import pylibmc >>> import datastore.memcached >>> >>> mc = pylibmc.Client(['127.0.0.1']) >>> ds = datastore.memcached.MemcachedDatastore(mc) >>> >>> hello = datastore.Key('hello') >>> ds.put(hello, 'world') >>> ds.contains(hello) True >>> ds.get(hello) 'world' >>> ds.delete(hello) >>> ds.get(hello) None