A FastAPI-based service for executing coding solutions inside a Kubernetes environment.
Ensure Docker Desktop is running and Kubernetes is enabled.
git clone https://github.com/idos12345/leetcode-executor.gitCopy the .env file to the project folder before running the application.
python -m venv venv- Windows:
venv\Scripts\activate 
- Linux/macOS:
source venv/bin/activate
pip install -r requirements.txtcd leetcode_execution_api
fastapi dev main.pycd ..
python cli.py 1 examples/bad_java_sol.txt java- 🏗 Execute solutions as Kubernetes jobs
- 📜 Fetch logs from K8s job execution
- 🧪 Infer test results from unit test logs
- 🖼 Dynamically generate Docker images for testing
- 🌐 REST API built with FastAPI
- POST /execute_solution/→ Run a coding solution inside a Kubernetes job
{
    "question_id": 1,
    "code": "ZGVmIGFkZChzZWxmLCBhLCBiKToNCglyZXR1cm4gYS1i",
    "language": "python"
}- ModuleNotFoundError: No module named 'fastapi'
 → Run:pip install fastapi
- Command 'fastapi' not found
 → Ensure the virtual environment is activated before running commands.