Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (22 sloc) 823 Bytes


This is the Python interface to the Redis key-value store.


>>> import redis
>>> r = redis.Redis(host='localhost', port=6379, db=0)
>>> r.set('foo', 'bar')   # or r['foo'] = 'bar'
>>> r.get('foo')   # or r['foo']

For a complete list of commands, check out the list of Redis commands here:


redis-py is developed and maintained by Andy McCurdy ( It can be found here:

Special thanks to:

  • Ludovico Magnocavallo, author of the original Python Redis client, from which some of the socket code is still used.
  • Alexander Solovyov for ideas on the generic response callback system.
  • Paul Hubbard for initial packaging support.
Jump to Line
Something went wrong with that request. Please try again.