This example shows the complete developer loop: receive code, create a sandbox, write a file, execute it, return output, and always destroy the sandbox.Documentation Index
Fetch the complete documentation index at: https://docs.stacyide.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A running StacyVM server.
- Docker provider access on the StacyVM host.
- Python 3.9+.
- A StacyVM API key if auth is enabled.
examples/code-runner-python.
Install
Configure
Run The App
Submit Code
Response
Why This Pattern Works
- The sandbox gets a short TTL so idle work is cleaned up.
- The app destroys the sandbox in a
finallyblock. - User code is written to a file instead of interpolated into a shell command.
- Runtime failures are returned as normal execution results.
- Provider failures return a clear API error.

