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.15.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

redis_extensions-1.0.15-py2.7.egg (10.7 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for redis-extensions-1.0.15.tar.gz
Algorithm Hash digest
SHA256 d895d4dd624617454dcf2d57a1ed4d1c12bc45b51e0697be0552d36cae425b8e
MD5 3023e018c6ecc0da5042437a420cd091
BLAKE2b-256 e6848b8a4bc91212f18beaf74e6df66b2fe97f401ffc83882f7becc1da8dedd3

See more details on using hashes here.

File details

Details for the file redis_extensions-1.0.15-py2.7.egg.

File metadata

File hashes

Hashes for redis_extensions-1.0.15-py2.7.egg
Algorithm Hash digest
SHA256 e0be9ff3b5a0789e7e5968fede1cdc054445dab0cf63f3f6ce0447a51737a8ff
MD5 e2cf5b9a161d882d18827de6f60d95fc
BLAKE2b-256 8db31a6b98f18554d3296f6b9242f31facedb7e3a04e0c3600e853b8a5762f7d

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