State & Data
postData()
You can use the postData()
function to execute Python or SQL on the backend.
Parameters
Specify the name of the Python or SQL to be executed.
Return value
An object is returned that contains the run
and running
methods for managing the execution state.
run(variables?: Record<string, unknown>, key?: string)
: Executes the backend function. Pass any variables you want to send to Python or SQL viavariables
.running(key?: string)
: Returns whether it’s currently running. Specifykey
to differentiate if multiple backend functions are executed.
About key
If you have a UI that can be executed from multiple places, by specifying key
, you can distinguish which place triggered the function.