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

Uploaded Source

Built Distribution

redis_extensions-1.0.24-py2.py3-none-any.whl (7.8 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for redis-extensions-1.0.24.tar.gz
Algorithm Hash digest
SHA256 6b78c429028692179a0017c3a6c117afd6a60abd77001c6ee5b8ed0176e8e426
MD5 6f00244fb3379e62a73908c1cdc7c294
BLAKE2b-256 d636329b451790f95adcbd0051e9bf67a6b3df8fb04c4d9d0411a29f999aa448

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for redis_extensions-1.0.24-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a0cff88d37dcc9b15baafea2ce8613c17ebe2e1c0e40ec2f865341fe7eb87d60
MD5 ea17fd2319c20fd114c1b1072f1d9d4e
BLAKE2b-256 aa5bb6878d16b7f97189fbef54890f7d9e51e7e9bffef5f5990b8c09bc208f0f

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