Hash

HKEYS

Return all field names in the hash stored at key.

Arguments

keybodystrrequired

The key of the hash.

Response

List[str]required

The field names of the hash

Example
redis.hset("myhash", values={    "field1": "Hello",    "field2": "World"})assert redis.hkeys("myhash") == ["field1", "field2"]
Loading search…