Hash
HMSET
Write multiple fields to a hash.
Arguments
keybodystrrequired
The key of the hash.
fieldsbodyDict[str, Any]required
A dictionary of fields and their values.
Response
intrequired
The number of fields that were added.
Example
# Set multiple fieldsassert redis.hset("myhash"{ "field1": "Hello", "field2": "World"}) == 2