# I have the dictionary my_dict
my_dict = {
\'var1\' : 5
\'var2\' : 9
}
r = redis.StrictRedis()
How would I store my_dict and retrieve it w
An other way you can approach the matter:
import redis
conn = redis.Redis('localhost')
v={'class':'user','grants': 0, 'nome': 'Roberto', 'cognome': 'Brunialti'}
y=str(v)
print(y['nome']) #<=== this return an error as y is actually a string
conn.set('test',y)
z=eval(conn.get('test'))
print(z['nome']) #<=== this really works!
I did not test it for efficiency/speed.