orchestrate_local
One-shot local execution of a code string in the Monty sandbox.
def orchestrate_local(
source: str,
inputs: Dict[str, Any],
tasks: Optional[List[Any]] = None,
timeout_ms: int = 30_000
) - > Any
One-shot local execution of a code string in the Monty sandbox. Sends the code + inputs to Monty and returns the result directly, without creating a TaskTemplate or going through the controller. The last expression in source becomes the return value.
Parameters
| Name | Type | Description |
|---|---|---|
| source | str | Python code string to execute in the sandbox. |
| inputs | Dict[str, Any] | Mapping of input names to their values. |
| tasks | Optional[List[Any]] = None | List of external functions (tasks, durable ops) available inside the sandbox. Each item's __name__ is used as the key. |
| timeout_ms | int = 30_000 | Sandbox execution timeout in milliseconds. |
Returns
| Type | Description |
|---|---|
Any | The result of the executed code string. |