> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-dx-3009-array-sdk-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ARMSET

> Write values at several array indexes.

These writes leave the append cursor unchanged.

## Arguments

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

<ParamField body="values" type="Mapping[int, ValueT] | Iterable[Tuple[int, ValueT]]" required>
  A mapping of indexes to values, or an iterable of index-value pairs. Provide at least one pair.
</ParamField>

## Response

<ResponseField type="int" required>
  The number of previously empty slots that were filled.
</ResponseField>

<RequestExample>
  ```py Example theme={"system"}
  print(redis.armset("readings", {0: "a", 10: "b"}))  # 2
  print(redis.armset("readings", [(10, "B"), (20, "c")]))  # 1
  ```
</RequestExample>

See the [server command reference](/redis/commands/array/armset) for protocol details.
