Python
There are many Redis client libraries for the Python language, and we are going to present redis-py, the most mature Redis client implementation for Python. The Python version used for all examples is 2.7.
Installing redis-py (it is recommended to install it in a virtualenv):
$ pip install redis
In this section, the Python code has comments that represent the result of the previous expression. It is recommended to run all of the code from this section in the interactive Python interpreter (python or ipython in the command line).
The basic commands in Python
Most Redis commands are accessed in redis-py through a very simple interface. Each executed command returns a value synchronously. Some basic commands are shown in the following code, and after this, you should be able to figure out how most of them work:
import redis client = redis.StrictRedis(host='localhost', port=6379) client.set("string:my_key", "Hello World") client.get("string:my_key"...