> ## Documentation Index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# EVAL_RO

> Evaluate a read-only Lua script server side.

## Arguments

<ParamField body="script" type="str" required>
  The read-only lua script to run.
</ParamField>

<ParamField body="keys" type="List[str]" required>
  All of the keys accessed in the script
</ParamField>

<ParamField body="args" type="unknown[]" required>
  All of the arguments you passed to the script
</ParamField>

## Response

<ResponseField type="Any" required>
  The result of the script.
</ResponseField>

<RequestExample>
  ```py Example theme={"system"}
  script = """
  local value = redis.call("GET", KEYS[1])
  return value
  """

  redis.set("mykey", "Hello")

  assert redis.eval_ro(script, keys=["mykey"]) == "Hello"
  ```

  ```py Accepting arguments theme={"system"}
  assert redis.eval_ro("return ARGV[1]", args=["Hello"]) == "Hello"
  ```
</RequestExample>


## Related topics

- [EVAL_RO](/docs/redis/sdks/ts/commands/scripts/eval_ro.md)
- [EVALSHA_RO](/docs/redis/sdks/py/commands/scripts/evalsha_ro.md)
- [Changelog](/docs/redis/overall/changelog.md)
- [Key-Based Locking](/docs/redis/features/key-locking.md)
