NOTICE: If you're reading this on GitHub.com please be aware this is a mirror of the primary remote located at https://code.richard.do/explore/projects. Please direct issues and pull requests there.
A Python Dict which stores data in Redis.
You can use RedisDict
exactly like a normal dict
. As long as all the keys and values in it are picklable.
To install, simply:
pip install persistent-dict
import redis
from persistentdict import RedisDict
mydict = RedisDict(persistence=redis.StrictRedis())
# with a specific storage key in redis
mydict = RedisDict(persistence=redis.StrictRedis(), key='stuff')
mydict['hello'] = 'world'
print(mydict)
{'hello': 'world'}
- Support for other storage backends other than Redis.