redis namespace
Project description
redis-namespace
redis-namespace for python
Redis::Namespace provides an interface to a namespaced subset of your [redis][https://redis.io] keyspace (e.g., keys with a common beginning), and requires the [redis-py][https://github.com/andymccurdy/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.3.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for redis_namespace-0.0.3-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d9cc36d259839b739ac6442d8213b65e0c588a21cda25dfc9c0598016ee8437 |
|
MD5 | d6dbc8c38ad7fe7ca110517e197ffc1a |
|
BLAKE2b-256 | 6d3cb47fed001fe6dd86816fd1f659c2c4e5db8cddeb73a05dd338e26512b092 |