All Projects → guokr → redis-namespace

guokr / redis-namespace

Licence: MIT license
namespaced subset of your redis keyspace

Programming Languages

python
139335 projects - #7 most used programming language

redis-namespace

Build Status PyPi Version

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

Warning: The redis-py's version must match redis-namespace's

Supported list

redis-py redis-namespace
3.0.1 3.0.1.1
2.10.6 2.10.6.1
2.10.5 2.10.5.2
2.10.3 2.10.3.1
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].