redis.hset("myhash", "field1", "Hello")

assert redis.hget("myhash", "field1") == "Hello"
assert redis.hget("myhash", "field2") is None

Arguments

key
str
required

The key to get.

field
str
required

The field to get.

Response

The value of the field, or null, when field is not present in the hash or key does not exist.