BaseMax / fastapi-code-platform
A secure GitHub-like platform to store, version, and execute Python code inside an isolated Docker sandbox.
README
FastAPI Code Snippet & Execution Platform
A secure GitHub-like platform to store, version, and execute Python code inside an isolated Docker sandbox.
Features
- Versioned code snippets
- Async execution queue (Redis)
- Isolated Docker sandbox
- Execution logs
- Swagger / OpenAPI
- MariaDB persistence
- Type-safe FastAPI + Pydantic
Stack
FastAPI • MariaDB • Redis • Docker • Async Python • SQLAlchemy 2.0
Run
1. Install (modern)
uv sync
2. Start system
docker compose up --build
API → http://localhost:8000/docs
Flow
- Create snippet →
/snippets - Execute snippet →
/execute - Worker runs code in Docker sandbox
- Output saved in DB
Security
- Code runs in isolated container
- No host access
- Output limited
- Timeout enforced
- Builtins restricted
License
MIT License
Copyright 2026
Seyyed Ali Mohammadiyeh (Max Base)
