redis namespace
Project description
redis-namespace
redis-namespace for python
Redis::Namespace provides an interface to a namespaced subset of your redis keyspace (e.g., keys with a common beginning), and requires the redis-py.
import redis
from redis_namespace import StrictRedis
redis_connection = redis.StrictRedis()
namespaced_redis = StrictRedis(namespace='ns:')
namespaced_redis.set('foo', 'bar') # redis_connection.set('ns:foo', 'bar')
namespaced_redis.get('foo')
redis_connection.get('ns:foo')
namespaced_redis.delete('foo')
namespaced_redis.get('foo')
redis_connection.get('ns:foo')
Installation
pip install redis-namespace
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_namespace-0.0.4.tar.gz
(4.4 kB
view hashes)
Built Distributions
Close
Hashes for redis_namespace-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 688a8f730c10ed6dc69b84d6ccfebd5f1f5ce5172ea4fa784896183bad17d879 |
|
MD5 | 05157f335d84e016dbd384c628eb23d3 |
|
BLAKE2b-256 | fc7e757c13004a1b450529da7a8c9f401c6e8ee3598967df6abd4bc267e79789 |
Close
Hashes for redis_namespace-0.0.4-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d88c94213f4bf2ff0efe601441b2e79e587c694d97ca6cb206f2274b9dc642b |
|
MD5 | 54dd4a708914141c2fb8e107734bd72d |
|
BLAKE2b-256 | 1b4ee32a9ca9e233583c3d1187fa15a14a0cd0a8415a9038a52c1ebb0ee46168 |