- Library: redis-py
- Library version : 3.5.3
- Library version: Python 3.7.3
- RS version: 6.0.8-32
- OSS Redis: 6.0.6
Simple | Sentinel | Cluster | |
---|---|---|---|
Y | Y | Y* | |
TLS | Y | Y | Y* |
- N/A : Not Available
- N/C : Not researched or checked
- Cluster API supported by a separate extension to library
- Sentinel with TLS requires a workaround
- ToDo: find way to verify ip address manually for Cluster/Sentinel TLS
Install Python3 for your platform
Make sure you are in redispy directory and create virtual environment and activate it
python3 -m venv venv
. venv/bin/activate
Install the dependencies
pip install -r requirements.txt
Password is optional for all samples
Start Redis instance.
python simple.py redishost port password
python simpletls.py redishost port password
python sentinel.py sentinelhost port service password
python sentineltls.py sentinelhost port service password
Redis-py does not support cluster API. This sample uses an extension to redis-py. https://github.com/Grokzen/redis-py-cluster. Note that redis-cluster does not support the latest version of redis-py
deactivate previous venv by running deactivate
and cd to cluster
python3 -m venv venv
. venv/bin/activate
Install the dependencies
pip install -r requirements.txt
python cluster.py node1 port password
python clustertls.py node1 port password