Represents an active sandbox for running commands and file operations.
This class is typically obtained from SandboxClient.sandbox() and supports the context manager protocol for automatic cleanup.
Sandbox(
self,
name: str,
template_name: str,
dataplane_url: Optional[str] = None,
id: Optional[str] = None,
created_at: Optional[str] = None,
updated_at: Optional[str] = None,
_client: SandboxClient = None,
_auto_delete: bool = True
)Example:
with client.sandbox(template_name="python-sandbox") as sandbox: result = sandbox.run("python --version") print(result.stdout)