Sandbox

class baseten.sandbox.Sandbox

Bases: object

One sandbox, to run processes and work with files in.

Get one from SandboxClient.create(), SandboxClient.get(), or SandboxClient.sandbox_from_url().

Parameters:

context (SandboxContext)

property fs: SandboxFileSystem

Files and directories in the sandbox.

property name: str

Name of the sandbox. Empty when made from a URL alone.

property previews: SandboxPreviews

The sandbox’s previews, which expose its ports on HTTPS URLs.

Every call fails on a sandbox from SandboxClient.sandbox_from_url(), which has no name.

property process: SandboxProcess

Processes in the sandbox.

property raw_api: ApiClient

The generated client for this sandbox’s execution API, authenticated.

For operations this SDK does not wrap. The generated API surface is not covered by stability guarantees and may change between versions.

property url: str

Base URL of the sandbox’s execution API.