AsyncSandbox
Source: leap0/_async/sandbox.py
Signature
Section titled “Signature”AsyncSandbox(client: 'AsyncLeap0Client', data: SandboxData | SandboxStatus)Overview
Section titled “Overview”Sandbox object with bound asynchronous service clients.
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”async refresh() -> AsyncSandboxRefresh this sandbox object with the latest metadata.
Returns: AsyncSandbox: This sandbox object with refreshed metadata.
async pause(http_timeout: float | None = None) -> AsyncSandboxPause the sandbox and return updated metadata.
Args: http_timeout: Optional HTTP request timeout in seconds for this SDK call.
Returns: AsyncSandbox: This sandbox object with updated metadata.
delete
Section titled “delete”async delete(http_timeout: float | None = None) -> NoneTerminate and delete a 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 for 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 websocket URL for this sandbox.
Args: path: Request path inside the sandbox application. port: Port number for the generated URL.
Returns: str: Sandbox-scoped websocket URL.