Represents an active sandbox for running commands and file operations async.
This class is typically obtained from AsyncSandboxClient.sandbox() and supports the async context manager protocol for automatic cleanup.
AsyncSandbox(
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: AsyncSandboxClient = None,
_auto_delete: bool = True
)Example:
async with await client.sandbox(template_name="python-sandbox") as sandbox: result = await sandbox.run("python --version") print(result.stdout)