3 ms·
The redis python client already uses an API that maps 1:1 with Redis which makes it simple to read the redis docs and get going. Store a dictionary: impor
by fictorial 16y ago
The redis python client already uses an API that maps 1:1 with Redis which makes it simple to read the redis docs and get going.
Store a dictionary:
import redis
r = redis.Redis()
r.hmset('key', dict(foo='bar', n=42))
Store a single value in a dictionary/hash:
r.hset('key', 'foo', 'buz')