Skip to main content

Redis-extensions is a collection of custom extensions for Redis-py.

Project description

Redis-extensions is a collection of custom extensions for Redis-py.

Installation

pip install redis-extensions

Usage

In [1]: import redis_extensions as redis

In [2]: r = redis.StrictRedisExtensions(host='localhost', port=6379, db=0)

In [3]: r.zaddwithstamps('sorted_set', 1, 'a', 2, 'b')
Out[3]: 1

In [4]: r.zrange('sorted_set', 0, 100, withscores=True)
Out[4]: [('a', 11472205032192.0), ('b', 21472205032192.0)]

In [5]: r.zrange('sorted_set', 0, 100, withscores=True, score_cast_func=r.rawscore)
Out[5]: [('a', 1.0), ('b', 2.0)]

In [6]: r.zincrbywithstamps('sorted_set', 'a')
Out[6]: 0

In [7]: r.zrange('sorted_set', 0, 100, withscores=True)
Out[7]: [('b', 21472205032192.0), ('a', 21472205071514.0)]

In [8]: r.zrange('sorted_set', 0, 100, withscores=True, score_cast_func=r.rawscore)
Out[8]: [('b', 2.0), ('a', 2.0)]

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

redis-extensions-1.0.6.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

redis_extensions-1.0.6-py2.py3-none-any.whl (5.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file redis-extensions-1.0.6.tar.gz.

File metadata

File hashes

Hashes for redis-extensions-1.0.6.tar.gz
Algorithm Hash digest
SHA256 acdf7ca303cd23b28ac379487db5cffad0b380bab6476afd8b45d0a4185d08a7
MD5 46c69419500f939d371bf7fc445dc93b
BLAKE2b-256 32c6a7c2f0a5b449c2ac51dabf20ed1f0b3161bb62ffbffec4b8d49806cb1702

See more details on using hashes here.

File details

Details for the file redis_extensions-1.0.6-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for redis_extensions-1.0.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 552422b37f9526b6c62b132b6e79df1e66e97283898370e9a47471a58490b4e5
MD5 0118654c717fed2cc17e707df7822849
BLAKE2b-256 8dd075c75660934e4e3d051a2a4cf45831e7a174ac732f8c28804cb414c6728e

See more details on using hashes here.

Supported by

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