Error loading web-python, see the developer console.
web-python does not work on mobile devices or older browsers. See the about page for more information. This is tested on Chromium and Firefox.
web-python
web-python is a web-based Python interpreter powered by Pyodide, leveraging its experimental local directory mounting feature to sync the WASM filesystem with a local writable directory.
This feature is not yet available on all browsers. See documentation for showDirectoryPicker for more information.
showDirectoryPicker
Select a local directory, enter arguments for the Python interpreter (e.g. main.py arg1 arg2), and click Run. The arguments field suggests .py files from your project as you type.
main.py arg1 arg2
.py
To run a one-liner without a directory, use the -c flag: -c "print('hello world!')"
-c
-c "print('hello world!')"
Click "Import from GitHub" to fetch a public repository. Accepted formats:
user/repo user/repo@branch https://github.com/user/repo https://github.com/user/repo/tree/branch https://github.com/user/repo/tree/branch/sub/dir
If a local directory is mounted the files are written there (persisted to disk). Otherwise they are loaded into the interpreter's in-memory filesystem for the current session. main.py is auto-selected in the arguments field after a successful import.
main.py
Ctrl+Enter / Cmd+Enter — Run (from the arguments field) Ctrl+L / Cmd+L — Clear terminal Ctrl+Wheel — Zoom terminal font size ↑ / ↓ — Navigate file suggestions Escape — Dismiss file suggestions
Ctrl+Enter
Cmd+Enter
Ctrl+L
Cmd+L
Ctrl+Wheel
↑
↓
Escape
Dependencies are read from requirements.txt and/or pyproject.toml in your project root and installed via micropip before each run. Both files are merged if present; reinstall only happens when either file changes.
requirements.txt
pyproject.toml
micropip
requirements.txt — one package per line:
numpy pandas>=2.0 matplotlib
pyproject.toml — PEP 621 and Poetry formats:
# PEP 621 [project] dependencies = ["numpy", "pandas>=2.0"] # Poetry [tool.poetry.dependencies] numpy = "*" pandas = "^2.0"
Not all PyPI packages are compatible with Pyodide's WebAssembly environment. See the list of supported packages.
Questions, bugs, or feature requests — open an issue on GitHub.
web-python is an independent project and is not affiliated with or endorsed by the Python Software Foundation (PSF). The Python logo is a trademark of the PSF, used here under the trademark usage policy.
Fetch a public GitHub repository into the interpreter. Accepted formats:
Files are loaded into the interpreter's in-memory filesystem for the current session.
⚠ A local directory is currently mounted. The imported files will be written into that directory and saved to disk.