Execute code safely in sandboxed environments with resource limits.
bash
python3 scripts/execute.py \
--language python \
--code "print('Hello, World!')" \
--timeout 10
bash
python3 scripts/execute.py \
--language python \
--file ./script.py \
--timeout 30 \
--memory 256
bash
python3 scripts/execute.py \
--language javascript \
--code "console.log(2 + 2)"
bash
python3 scripts/execute.py \
--language python \
--code "x = input(); print(f'You said: {x}')" \
--input "Hello"
json
{
"success": true,
"stdout": "Hello, World!\n",
"stderr": "",
"exit_code": 0,
"execution_time_ms": 42
}