Skip to content

A secure GitHub-like platform to store, version, and execute Python code inside an isolated Docker sandbox.

License

Notifications You must be signed in to change notification settings

BaseMax/fastapi-code-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  1. Create snippet → /snippets
  2. Execute snippet → /execute
  3. Worker runs code in Docker sandbox
  4. 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)

About

A secure GitHub-like platform to store, version, and execute Python code inside an isolated Docker sandbox.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published