Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
redis.hset("myhash", values={ "field1": "Hello", "field2": "World" }) assert redis.hrandfield("myhash") in ["field1", "field2"]
redis.hset("myhash", values={ "field1": "Hello", "field2": "World" }) assert redis.hrandfield("myhash", count=2) in [ ["field1", "field2"], ["field2", "field1"] ]
redis.hset("myhash", values={ "field1": "Hello", "field2": "World" }) assert redis.hrandfield("myhash", count=1, withvalues=True) in [ {"field1": "Hello"}, {"field2": "World"} ]
Return a random field from a hash
Was this page helpful?