skip to navigation
skip to content

rediscluster 0.2.5

Python client for Cluster of Redis key-value store

Latest Version: 0.5.3

a Python interface to a Cluster of Redis key-value store.

Project Goals

The goal is to be a drop in replacement of redis-py when you would like to shard your data into a cluster of redis servers. rediscluster-py is based on the awesome redis-py StrictRedis Api, thus the original api commands would work without problems within the context of a cluster of redis servers

Travis CI

Currently, rediscluster-py is being tested via travis ci for python version 2.6, 2.7 and 3.2:


$ sudo pip install rediscluster

or alternatively (you really should be using pip though):

$ sudo easy_install rediscluster

From source:

$ sudo python install

Running Tests

$ git clone
$ cd rediscluster-py
$ vi tests/
$ ./run_tests

Getting Started

>>> import rediscluster
>>> cluster = {
...          'nodes' : {
...                      'node_1' : {'host' : '', 'port' : 63791},
...                      'node_2' : {'host' : '', 'port' : 63792},
...                      'node_5' : {'host' : '', 'port' : 63795},
...                      'node_6' : {'host' : '', 'port' : 63796}
...                    },
...          'master_of' : {
...                          'node_1' : 'node_6', #node_6 slaveof node_1 in redis6.conf
...                          'node_2' : 'node_5'  #node_5 slaveof node_2 in redis5.conf
...                        },
...          'default_node' : 'node_1'
...     }
>>> r = rediscluster.StrictRedisCluster(cluster=cluster, db=0)
>>> r.set('foo', 'bar')
>>> r.get('foo')

Tagged keys

In order to specify your own hash key (so that related keys can all land on a given node), you pass a list where you’d normally pass a scalar. The first element of the list is the key to use for the hash and the second is the real key that should be fetched/modify:

>>> r.get(["userinfo", "foo"])

In that case “userinfo” is the hash key but “foo” is still the name of the key that is fetched from the redis node that “userinfo” hashes to.



rediscluster-py is developed and maintained by Salimane Adjao Moustapha ( It can be found here:

File Type Py Version Uploaded on Size
rediscluster-0.2.5-py2.7.egg (md5) Python Egg 2.7 2012-09-17 19KB
rediscluster-0.2.5-py3.2.egg (md5) Python Egg 3.2 2012-09-17 19KB
rediscluster-0.2.5.tar.gz (md5) Source 2012-09-17 7KB
rediscluster-0.2.5.win32-py2.7.exe (md5) MS Windows installer 2.7 2012-09-17 73KB
rediscluster-0.2.5.win32-py3.2.exe (md5) MS Windows installer 3.2 2012-09-17 73KB