File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ * .pyc
Original file line number Diff line number Diff line change 1- # fastapi-code-platform
1+ # FastAPI Code Snippet & Execution Platform
2+
3+ A secure GitHub-like platform to store, version, and execute Python code inside an isolated Docker sandbox.
4+
5+ ## Features
6+
7+ * Versioned code snippets
8+ * Async execution queue (Redis)
9+ * Isolated Docker sandbox
10+ * Execution logs
11+ * Swagger / OpenAPI
12+ * MariaDB persistence
13+ * Type-safe FastAPI + Pydantic
14+
15+ ## Stack
16+
17+ FastAPI • MariaDB • Redis • Docker • Async Python • SQLAlchemy 2.0
18+
19+ ---
20+
21+ ## Run
22+
23+ ### 1. Install (modern)
24+
25+ ``` bash
26+ uv sync
27+ ```
28+
29+ ### 2. Start system
30+
31+ ``` bash
32+ docker compose up --build
33+ ```
34+
35+ API → [ http://localhost:8000/docs ] ( http://localhost:8000/docs )
36+
37+ ---
38+
39+ ## Flow
40+
41+ 1 . Create snippet → ` /snippets `
42+ 2 . Execute snippet → ` /execute `
43+ 3 . Worker runs code in Docker sandbox
44+ 4 . Output saved in DB
45+
46+ ---
47+
48+ ## Security
49+
50+ * Code runs in isolated container
51+ * No host access
52+ * Output limited
53+ * Timeout enforced
54+ * Builtins restricted
55+
56+ ---
57+
58+ ## License
59+
60+ MIT License
61+
62+ Copyright 2026
63+
64+ Seyyed Ali Mohammadiyeh (Max Base)
You can’t perform that action at this time.
0 commit comments