SandboxedTaskTemplate
A task template that executes the function body in a Monty sandbox.
Attributes
| Attribute | Type | Description |
|---|---|---|
| task_type | str = "sandboxed-python" | The identifier for the task execution environment, set to "sandboxed-python" to trigger Monty sandbox execution. |
| plugin_config | Optional[[SandboxedConfig](../config/sandboxedconfig.md?sid=flyte_sandbox__config_sandboxedconfig)] = null | Configuration settings for the sandboxed environment, defaulting to a standard SandboxedConfig if not provided. |
Constructor
Signature
def SandboxedTaskTemplate()
Methods
execute()
@classmethod
def execute(
*args: Any,
**kwargs: Any
) - > Any
Execute the function body in a Monty sandbox.
Parameters
| Name | Type | Description |
|---|---|---|
| *args | Any | Positional arguments to be passed to the sandboxed function. |
| **kwargs | Any | Keyword arguments to be passed to the sandboxed function. |
Returns
| Type | Description |
|---|---|
Any | The result of the sandboxed function execution after processing pre and post hooks. |
forward()
@classmethod
def forward(
*args: Any,
**kwargs: Any
) - > Any
Bypass Monty and call the function directly (for local/debug execution).
Parameters
| Name | Type | Description |
|---|---|---|
| *args | Any | Positional arguments to pass directly to the underlying function. |
| **kwargs | Any | Keyword arguments to pass directly to the underlying function. |
Returns
| Type | Description |
|---|---|
Any | The direct return value of the underlying Python function. |