redis.hset("myhash", values={
"field1": "Hello",
"field2": "World"
})

assert redis.hgetall("myhash") == {"field1": "Hello", "field2": "World"}

Arguments

key
str
required

The key to get.

Response

An object with all fields in the hash.

redis.hset("myhash", values={
"field1": "Hello",
"field2": "World"
})

assert redis.hgetall("myhash") == {"field1": "Hello", "field2": "World"}