Production-ready Flask API for secure, sandboxed Python code execution.
Includes rate-limiting, Docker, strong code validation, logging, modular structure — всё, что надо для продакшена и продажи.
- Safe Python code execution in a temp-file sandbox
- Strict validation (blocks os, subprocess, sys, и прочую дичь)
- Rate limiting (anti-abuse, 3 per minute)
- Docker-ready, clean project structure
- Simple API, easy integration
- Logging (прозрачные логи для аудита)
- Полностью совместим с Postman, curl, любым front-end
Request:
{
"code": "print('hello, world!')"
}
Response:
{
"stdout": "hello, world!",
"stderr": "",
"returncode": 0
}
/run
: 3 per minute per IP
docker build -t code-runner-api .
docker run -d -p 5000:5000 code-runner-api
pip install -r requirements.txt
python app.py
cmd_server_start.png
— Сервер запущенcmd_running_api.png
— Живые логи APIpostman_success.png
— Успешный запрос через Postman
💡 You can see real examples on the Gumroad gallery.
You can get a ZIP version with all files, setup instructions, .env.example
, and more:
Need this in another stack (Node.js, Go, etc)?
Contact: [email protected]
Telegram: @talabovali
Note: Pricing may vary depending on complexity and target stack.
Ready for production and monetization. 100% tested.