Hash
HGET
Retrieves the value of a hash field.
Arguments
keybodystrrequired
The key to get.
fieldbodystrrequired
The field to get.
Response
Optional[str]
The value of the field, or null, when field is not present in the hash or key does not exist.
Example
redis.hset("myhash", "field1", "Hello")assert redis.hget("myhash", "field1") == "Hello"assert redis.hget("myhash", "field2") is None