PyREPL is a simple web based Python REPL created using the Pyodide WASM Python interpreter.
By using Pyodide there is no need server/backend for running any code, it is all done in the client's browser. This reduces complexity and make's it super portable.
Code is stored locally in your browser using IndexedDB, so it persists between visits and never leaves your device.
To share, the REPL is compressed utilizing fflate, and URL-encoded into a single query parameter to produce a shareable link.
I primarily developed this for my own classroom when I teach a small Python foundations unit, it allows me to introduce students to the Python language without needing to setup and entire development environment.
I also personally want to quickly just test/share some Python code and I couldn't find a solution that fit my use case.
- Single file only
- No 3rd party packages
- Pyodide Python compatibility
- Unable to interupt
time.sleep()(pyodide/pyodide#5927)
- The amazing Pyodide team who without their WASM port of CPython none of this would be possible
- Vue's REPL, which was the final piece of the puzzle to make the app as portable as possible