For information on the interface API implementations recommended by Redis for a variety of programming languages, refer to the http://redis.io/clients/
To select the Python language, use the Https://github.com/andymccurdy/redis-py
Installation
Redis-py requires a running Redis server. See Redis's QuickStart (Http://redis.io/topics/quickstart) for installation instructions.
To install Redis-py, simply:
$ sudo pip install Redis
Or alternatively (you really should is using PIP though):
$ sudo easy_install redis
or from Source:
$ sudo python setup.py install
Getting Started
>>>ImportRedis >>> r = redis. Strictredis (host= ' localhost ' span class= "n" >port=6379 db=< Span class= "Mi" >0) >>> r. Set ( ' foo ' ' bar ' true>>> r. Get ( ' foo ' ) ' bar '
API Reference
The official Redis command documentation does a great job of explaining each command in detail. Redis-py exposes the client classes that implement these commands. The Strictredis class attempts to adhere to the official command syntax. There is a few exceptions:
Redis Client API