> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-dx-3081-agentkit-tanstack-ai-backends.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# HGETALL

> Retrieves all fields from a hash.

## Arguments

<ParamField body="key" type="str" required>
  The key to get.
</ParamField>

## Response

<ResponseField type="Optional[str]" required>
  An object with all fields in the hash.
</ResponseField>

<RequestExample>
  ```py Example theme={null}
  redis.hset("myhash", values={
  "field1": "Hello",
  "field2": "World"
  })

  assert redis.hgetall("myhash") == {"field1": "Hello", "field2": "World"}
  ```
</RequestExample>


## Related topics

- [HGETALL](/redis/sdks/ts/commands/hash/hgetall.md)
- [HGET](/redis/commands/hash/hget.md)
- [HMGET](/redis/commands/hash/hmget.md)
- [HELLO](/redis/commands/connection/hello.md)
