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

# ARSET

> Write consecutive values starting at an array index.

Positional writes leave the append cursor unchanged. To append after positional writes, use [ARSEEK](./arseek) with the length returned by [ARLEN](./arlen).

## Arguments

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

<ParamField body="index" type="int" required>
  The zero-based index to access.
</ParamField>

<ParamField body="values" type="*values: ValueT" required>
  One or more values to write. Values may be strings, integers, floats, or booleans.
</ParamField>

## Response

<ResponseField type="int" required>
  The number of previously empty slots that were filled. Overwriting a value contributes zero.
</ResponseField>

<RequestExample>
  ```py Example theme={"system"}
  print(redis.arset("readings", 0, 21.5, 21.7))  # 2
  print(redis.arset("readings", 1, 22.1))  # 0
  ```
</RequestExample>

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