Inputs
Inputs in Gromet define the parameters your users will see in the Form tab, and how they’re passed to your Python script.
Each input is declared in the YAML under a single inputs key (see Quickstart). Gromet then auto-generates a form and wires the responses into your main() function.
General Input Format
Each input in the YAML supports the following common keys:
arg: The argument name passed to your Pythonmain()function. Must match your function parameter name exactly.title: The label shown in the form UI.type: The input type (e.g.,file,text,dropdown,multiselect,textarea,date).required: Boolean (trueorfalse) indicating if the input is mandatory. Default isfalse.placeholder: Optional placeholder text shown inside text or textarea inputs.extensions: For file inputs, a list of allowed file extensions (e.g.,[xlsx, xls]).options: For dropdowns and multiselects, a list of selectable options, each withvalueandlabel.
Notes:
Inputs are passed to
main()in the order they appear in the YAML list.Optional inputs not provided will be passed as
None.
Below are the supported input types:
📂 file
fileYAML:
Python:
▫️ The input is passed as a local file path string to your Python function.
▫️ To enable all file extensions pass an empty array as the value i.e
extensions: []
🔤 text
textYAML:
Python:
▫️ The value is passed as a string.
📝 textarea
textareaYAML:
Python:
▫️ Multi-line text, passed as a string.
🕽️ dropdown - Select a single input from a range of options
dropdown - Select a single input from a range of optionsYAML:
Python:
▫️ Passed as a string matching the selected
value.
🧑🤝🧑 multiselect - Select multiple inputs from a range of options
multiselect - Select multiple inputs from a range of optionsYAML:
Python:
▫️ Passed as a list of strings (the
values of the selected options).
🗓️ date
dateYAML:
Python:
▫️ Passed as a string in YYYY-MM-DD format.
☑️ checkbox
YAML:
Python:
Python receives the checkbox value as a native
booltype — no manual string-to-boolean conversion needed.This seamless conversion is handled automatically by the Gromet input system.
If the checkbox is required, the form enforces it must be checked (
True) before submission.Frontend still stores the state as a string internally for simplicity.
🧪 Notes
All
argnames must match the function parameters inmain()Inputs are passed in positional order (by YAML list order)
Optional fields will be passed as
Noneif not provided
Last updated