Elements runtime reference / Runtime store

getVar

Read the current tenant-shared runtime variable value by id.

Signatuur

getVar(name, default=None)

Doel

Read the current tenant-shared runtime variable value by id.

Aliases and imports

  • getvar

Payloadformaat

Use these fields as the Python call arguments or keyword payload for this helper.

{
  "name": "temperature_threshold",
  "default": 80
}
FieldDescription
nameRuntime variable id.
defaultValue returned when the variable is missing.

Return payload

80

Voorbeeld

def run():
    threshold = float(getVar("temperature_threshold", 80) or 80)
    return {"threshold": threshold}

Scope-notities