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 therun 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. Specifykeyto differentiate if multiple backend functions are executed.
About key
If you have a UI that can be executed from multiple places, by specifyingkey, you can distinguish which place triggered the function.