Skip to main content

high performance redis client implemented with cython

Project description

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')

Project details


Download files

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

Source Distribution

credis-2.0.2.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

credis-2.0.2-cp310-cp310-macosx_13_0_x86_64.whl (273.5 kB view details)

Uploaded CPython 3.10macOS 13.0+ x86-64

File details

Details for the file credis-2.0.2.tar.gz.

File metadata

  • Download URL: credis-2.0.2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.11 Darwin/22.6.0

File hashes

Hashes for credis-2.0.2.tar.gz
Algorithm Hash digest
SHA256 b0738f08da452edd3667884c4e6ddcb5f6f988e87cbe6fdaca0308dce842f690
MD5 7deabe74ee2da89896b71fe2c3d34f57
BLAKE2b-256 9e118a08c4f9f8811f0c0f15a9b55d94633bf6a96df2c8849a2e0dd65c4c785d

See more details on using hashes here.

File details

Details for the file credis-2.0.2-cp310-cp310-macosx_13_0_x86_64.whl.

File metadata

  • Download URL: credis-2.0.2-cp310-cp310-macosx_13_0_x86_64.whl
  • Upload date:
  • Size: 273.5 kB
  • Tags: CPython 3.10, macOS 13.0+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.11 Darwin/22.6.0

File hashes

Hashes for credis-2.0.2-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 3f7c01beeed9499e3d3d8f70a3bcc974ac2997e530af109cd17473d9030b7d57
MD5 73494dfee2c48a36e0fd25c37847b83f
BLAKE2b-256 c451dac09a0b072d7e76cbbf95d538bbaf9525bf869acec8e608593dd5a6cc87

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page