Sandbox
Source: leap0/_sync/sandbox.py
Signature
Section titled “Signature”Sandbox(client: object, data: SandboxData | SandboxStatus)Overview
Section titled “Overview”Sandbox object with bound service clients.
This object exposes sandbox metadata directly and provides bound service
handles so you can call methods like sandbox.filesystem.read_file(...)
instead of passing the sandbox object into every client call.
Attributes: filesystem: Bound filesystem client. git: Bound git client. process: Bound process client. pty: Bound PTY client. lsp: Bound LSP client. ssh: Bound SSH client. code_interpreter: Bound code interpreter client. desktop: Bound desktop client.
Methods
Section titled “Methods”refresh
Section titled “refresh”refresh() -> SandboxRefresh sandbox metadata in place.
Returns: Sandbox: This sandbox object with refreshed metadata.
pause(http_timeout: float | None = None) -> SandboxPause the sandbox and update this handle with the latest metadata.
Args: http_timeout: Optional HTTP request timeout in seconds for this SDK call.
Returns: Sandbox: This sandbox object with updated metadata.
delete
Section titled “delete”delete(http_timeout: float | None = None) -> NoneDelete the sandbox.
Args: http_timeout: Optional HTTP request timeout in seconds for this SDK call.
invoke_url
Section titled “invoke_url”invoke_url(path: str = '/', *, port: int | None = None) -> strBuild an HTTPS URL that routes directly to this sandbox.
Args: path: Request path inside the sandbox application. port: Port number for the generated URL.
Returns: str: Sandbox-scoped HTTPS URL.
websocket_url
Section titled “websocket_url”websocket_url(path: str = '/', *, port: int | None = None) -> strBuild a WSS URL that routes directly to this sandbox.
Args: path: Request path inside the sandbox application. port: Port number for the generated URL.
Returns: str: Sandbox-scoped websocket URL.