Skip to main content

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.

Arguments

script
str
required
The read-only lua script to run.
keys
List[str]
required
All of the keys accessed in the script
args
unknown[]
required
All of the arguments you passed to the script

Response

The result of the script.
script = """
local value = redis.call("GET", KEYS[1])
return value
"""

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

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