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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file redis-extensions-1.0.18.tar.gz
.
File metadata
- Download URL: redis-extensions-1.0.18.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4833717ff9ededff136c7fc6739354b145950bcbb3017f5c0019b874f7bc9c9 |
|
MD5 | fe574f1dfda1d13e49da837b7f51b87a |
|
BLAKE2b-256 | 497f3eb0ce732f1b5e6094da0cee9fc13e89fb4214d3e23dcfd00f9562c73ad7 |
File details
Details for the file redis_extensions-1.0.18-py2.7.egg
.
File metadata
- Download URL: redis_extensions-1.0.18-py2.7.egg
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1641c6ccc7170b5cb31982047e04391ea96b62a46d9f205155265bde1489280 |
|
MD5 | 054f14ced2f8400b6bee5b520520e7fb |
|
BLAKE2b-256 | 785bc2d79e4bd4cd7393af20cb43bf61b82c38d094854d587a84f37660a57fcf |