Skip to main content
Import the top-level client from porter_sandbox:

Porter

Porter is the top-level sync client. It exposes resource namespaces for sandboxes, volumes, health, and readiness.
Constructor options:

porter.sandboxes

create

Arguments: Returns a Sandbox handle.

get

Looks up a sandbox by name and returns a Sandbox handle. Use names as the canonical reference for sandboxes you need to operate on later.

list

Lists sandboxes, optionally filtered by tags and page.

Sandbox

Sandbox is the handle returned by porter.sandboxes. Properties: Methods:

exec timeouts

exec is long-running: the client sends no timeout by default, so the call waits for the command to exit. Pass timeout (seconds) to cap how long the client waits. When the timeout elapses, the SDK raises SandboxTimeoutError and does not retry, since the command may still be running server-side.
The client-wide timeout on Porter still applies to every other request (30 seconds by default).

Volumes

Volumes are persistent storage that can be mounted into sandboxes.
Sandbox and volume names may contain lowercase letters, numbers, and hyphens, and must start and end with a letter or number. Sandbox names currently cannot be reused, even after termination. Volume names must be unique for the lifetime of the volume and can be reused after deletion. Volume methods:

Async client

AsyncPorter mirrors Porter with awaitable methods:

Low-level client

The top-level client exposes generated low-level clients through .raw:
Use these only when you need an endpoint that is not wrapped by the ergonomic SDK surface yet.

Next steps