Sometimes you do not want an SDK in the dependency tree: a small script, a locked-down service, or a codebase that already wraps every HTTP call its own way. The sandbox API underneath our SDKs is plain HTTP and JSON, so from Python you can drive it with requests and under 80 lines of code. This post builds that client, explains the choices in it, and lists what to add before you lean on it in production.
Everything here comes from the sandbox API guide and the Sandboxes API reference . If something in this post and the reference disagree, trust the reference.
The five calls
A sandbox's whole life is five requests against https://api.sandscale.dev/api/v1/sandbox :
Step Request Permission
Start POST /instances sandboxes:create
Write a file PUT /instances/{id}/files sandboxes:use
Run a command POST /instances/{id}/exec sandboxes:use
Read a file or list a folder GET /instances/{id}/files?path=...…