A secure, session-based web sandbox for executing Python code. This application provides each user with a dedicated, isolated Docker container that persists for their browser session.
- Each user session is assigned a dedicated Docker container that runs until the browser tab is closed.
- If your code imports a package that is not available, the sandbox automatically installs it from PyPI using a secure, isolated process.
- Code output is streamed directly from the container to the browser in real-time using WebSockets.
- Next.js Frontend
- Node.js Backend (router and websockets server)
- Dockerized Python Sandbox
- [Node.js]
- [Docker]
-
Install Project Dependencies
npm install
-
Build the Docker Image This command builds the secure sandbox environment.
docker build -t python-sandbox-image . -
Run the Development Server This starts the Next.js frontend and the WebSocket server.
npm run dev
On Linux or macOS
./run.shOn Windows
.\run.bat