9951 explained code solutions for 126 technologies


python-redisGet dict from Redis


We'll use Redis hash structure to save dicts:

r = redis.Redis()
dict = r.hgetall('dict')ctrl + c
redis.Redis

connect to Redis server

hgetall

gets Redis hash data and returns a dict

'dict'

name of the hash in Redis