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

assert redis.hkeys("myhash") == ["field1", "field2"]

Arguments

key
str
required

The key of the hash.

Response

The field names of the hash