Method comparison
Prerequisites
- Python
- Node.js
Method 1: copy_in / copy_out
The most common approach. Upload a file, process it, download the results.- Python
- Node.js
file_transfer.py
Method 2: Volume mounts
Mount a host directory directly into the box. Files are shared in real time — no explicit copy step needed.- Python
- Node.js
volume_mount.py
Method 3: Inline data via base64
For small payloads (under ~1 MB), you can send data through a shell command without touching the filesystem.inline_base64.py
copy_in. Not suitable for binary files or anything over ~1 MB.
Putting it together
Here’s a realistic workflow: upload a CSV, run analysis code on it, and download the results.full_workflow.py
What’s next?
Connect to an LLM
Let an LLM generate code and run it in your sandbox automatically.
AI agent integration
Production patterns: security presets, concurrency, timeout handling, and resource limits.

