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')
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