Execute Code
Sandcastles
Execute Code
Execute Python code in a sandbox
POST
Execute Code
Authorizations
API key or JWT token
Path Parameters
Sandbox ID
Body
application/json
Python code to execute
Response
Execution result
Stdout/stderr output as an array of strings, one element per print call. Null when execution fails with an error.
Execution error message, including the Python exception type and message (e.g. "executing Python code: ZeroDivisionError('division by zero')"). Only present when execution fails. When set, output is null.
Execution duration in milliseconds
Dataframes created or modified during execution. May be empty even if code creates dataframes — use GET /v2/sandcastles/{id} for the authoritative list of loaded dataframes.