1. Setup Python
2. Setup Redis
sudo pip install redis
Create a small python application to test your connection from Python to Redis
Create a file called redis_test.py in your home directory
Put the following lines of code in this new file.
import redis r = redis.StrictRedis(host='localhost', port=6379, db=0) r.set('foo', 'bar') print(r.get('foo'))
Run the code by typing python redis_test.py
This should return the value for the key ‘foo’ (‘bar’)