Variables

ValueType

Variables can be defined and manipulated through ValueType and UIType. ValueType is useful to define and process the variables. For example,

    "quiz_status": ValueType(
        type="str",
        value='default',
    ),  
    "quiz_idx": ValueType(
        type="int",
        value="${min(quiz_idx + 1, len(words) - 1)}",
    ),    

In the above example, we can use ${} to wrap an expression to update a variable called qui_idx.

the type of the ValueType can be

["str", "int", "float", "bool", "list", "dict"]

Variables from user inputs are handled by UIType. We support the following UITypes

UIType

to choose from some choices

Button

often used as triggers, to submit a form or jump to next pages

Textbox

display some information using plain-text

Image

display an image, the size of the image can be manually controlled

display a group of images

Audio

play a audio, the value need to be the path of the audio

DisplayDropdown

used when the choices need to be dynamically updated

Last updated