# 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
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.
