1 Star 0 Fork 0

yihuang / credis

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

minimal redis client written in cython, 5X faster than redis-py.

Tutorial

execute command

>>> from credis import Connection
>>> conn = Connection(host='127.0.0.1', port=6379)
>>> conn.execute('set', 'test', 1)
'OK'
>>> conn.execute('get', 'test')
'1'

execute pipelined commands

>>> commands = [('set', 'test%d'%i, i) for i in range(3)]
>>> conn.execute_pipeline(*commands)
('OK', 'OK', 'OK')

connection pool for gevent

>>> from credis.geventpool import ResourcePool
>>> pool = ResourcePool(32, Connection, host='127.0.0.1', port=6379)
>>> with pool.ctx() as conn:
...     conn.execute('get', 'test')
'1'
>>> pool.execute('get', 'test')
'1'
>>> commands = [('get', 'test%d'%i) for i in range(3)]
>>> pool.execute_pipeline(*commands)
('1', '2', '3')

空文件

简介

使用cython实现的高性能redis python客户端 展开 收起
Python
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/yiprogrammer/credis.git
git@gitee.com:yiprogrammer/credis.git
yiprogrammer
credis
credis
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891