1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
# redis-py-cluster
This client provides a client for redis cluster that was added in redis 3.0.
This project is a port of `redis-rb-cluster` by antirez, with alot of added functionality. The original source can be found at https://github.com/antirez/redis-rb-cluster
Gitter chat room: [![Gitter](https://badges.gitter.im/Grokzen/redis-py-cluster.svg)](https://gitter.im/Grokzen/redis-py-cluster?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Build Status](https://travis-ci.org/Grokzen/redis-py-cluster.svg?branch=master)](https://travis-ci.org/Grokzen/redis-py-cluster) [![Coverage Status](https://coveralls.io/repos/Grokzen/redis-py-cluster/badge.png)](https://coveralls.io/r/Grokzen/redis-py-cluster) [![PyPI version](https://badge.fury.io/py/redis-py-cluster.svg)](http://badge.fury.io/py/redis-py-cluster)
# Documentation
All documentation can be found at http://redis-py-cluster.readthedocs.org/en/master
This Readme contains a reduced version of the full documentation.
Upgrading instructions between each released version can be found [here](docs/upgrading.rst)
Changelog for next release and all older releasess can be found [here](docs/release-notes.rst)
## Installation
Latest stable release from pypi
```
$ pip install redis-py-cluster
```
## Usage example
Small sample script that shows how to get started with RedisCluster. It can also be found in [examples/basic.py](examples/basic.py)
```python
>>> from rediscluster import StrictRedisCluster
>>> # Requires at least one node for cluster discovery. Multiple nodes is recommended.
>>> startup_nodes = [{"host": "127.0.0.1", "port": "7000"}]
>>> # Note: decode_responses must be set to True when used with python3
>>> rc = StrictRedisCluster(startup_nodes=startup_nodes, decode_responses=True)
>>> rc.set("foo", "bar")
True
>>> print(rc.get("foo"))
'bar'
```
## License & Authors
Copyright (c) 2013-2016 Johan Andersson
MIT (See docs/License.txt file)
The license should be the same as redis-py (https://github.com/andymccurdy/redis-py)
|