Skip to main content
Use the Python SDK to create sandboxes, execute commands, and manage files.

Install

Initialize the Client

Create and Execute

File Operations

File content crosses the wire as base64 in both directions — SGVsbG8h above is Hello!. Passing raw text writes the literal characters of your string rather than the bytes you meant.

Cleanup

A sandbox runs, and bills, until it is stopped or timeout_seconds expires. Stop it in a finally block so a raised exception does not leave one up:

Handling failures

execute returns for a command that ran and failed — a non-zero exit is a result, not an exception. Check exit_code yourself; only transport and API errors raise.

Next steps

Sandbox quickstart

The wider flow, including REPL sessions and checkpoints.

API reference

Every endpoint this SDK wraps.

Node SDK

The same surface for Node services.

Security guide

What a sandboxed process can and cannot reach.
Last modified on August 31, 2026