Skip to main content

high performance redis client implemented with cython

Project description

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


execute command

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

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='', port=6379)
>>> with pool.ctx() as conn:
...     conn.execute('get', 'test')
>>> pool.execute('get', 'test')
>>> commands = [('get', 'test%d'%i) for i in range(3)]
>>> pool.execute_pipeline(*commands)
('1', '2', '3')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for credis, version 2.0.1
Filename, size File type Python version Upload date Hashes
Filename, size credis-2.0.1-cp38-cp38-macosx_10_15_x86_64.whl (195.5 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size credis-2.0.1-cp38-cp38-manylinux2014_x86_64.whl (501.9 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size credis-2.0.1.tar.gz (6.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page