Pyodide loads
from CDN.
The full CPython runtime — compiled to WebAssembly — initialises in the background. It's cached after the first visit, so reloads are near-instant.
Zero config. Zero backend. Zero build step. Just <py> and go.
Pytml is a minimal JavaScript library that lets you write Python directly inside your HTML. No server, no setup, no build step. It wraps Pyodide, connects print and input to the browser, and runs everything client-side in WebAssembly.
The full Python runtime loads lazily in the background, compiled to WebAssembly.
Python's built-in I/O is wired straight to the browser — no hacks, no shims.
Every Python block is detected, extracted, and queued — even if injected by React or Vue later.
Code runs in a sandboxed interpreter. Output is captured cleanly as it streams.
stdout, stderr, and Python tracebacks all appear inline with real line numbers and stack traces.
The full CPython runtime — compiled to WebAssembly — initialises in the background. It's cached after the first visit, so reloads are near-instant.
Python's built-in I/O is connected to the browser DOM. No polyfills, no shims, no surprises — output and input behave exactly like a local REPL.
Pytml scans the DOM for Python blocks — even ones injected later by React, Vue, or vanilla JS. Each numbered block gets its own isolated execution context.
Code runs safely in the browser. Nothing ever leaves the tab — no network calls, no backend, no data leaks. Perfect for privacy-sensitive demos.
stdout, stderr, and full Python tracebacks appear directly in a styled terminal. Errors are as readable as they are locally — line numbers included.
Scroll down. The panels move sideways automatically. No backend, no config file, no build step.
Drop a single script tag in your HTML. That's the entire setup. No py-config, no bundler, no environment file.
Python's print() and input() are wired directly to the browser. Output streams live; input reads from a native prompt.
No code, input, or output ever leaves the browser tab. Everything runs in WebAssembly. Perfect for privacy-sensitive demos.
Works inside React, Vue, Svelte, or plain HTML. Pytml scans the DOM after any framework renders — no integration needed.
Be honest — Pytml is not for everything. Here's where it genuinely wins.
Embed live Python in courseware. Students run code without installing anything — instant feedback, zero setup.
Interactive code snippets — readers tweak and run Python right in the article. No server costs.
Show visualisations or data processing with Python, all client-side. Perfect for portfolio projects.
Test Python logic in the browser without spinning up a Flask app. Great for hackathons and quick POCs.
Not for: heavy backend processing, database operations, or production APIs — use Flask for that. Pytml is client-side only.
It's not PyScript either. But for static pages, demos, and education, it wins on setup speed, bundle size, and simplicity.
| Feature | Pytml | PyScript | Flask |
|---|---|---|---|
| Setup time | ✔ 1 minute | ~ 5+ minutes | ~ 10+ minutes |
| Server required | ✔ No — static | ✔ No — static | ✘ Yes — backend |
| Bundle size | ✔ ~15 KB | ~ Larger | — N/A |
| Pyodide load | ✔ Lazy | ✘ Eager | — N/A |
| Configuration | ✔ Zero | ~ py-config file | ~ Full project |
| Best for | ✔ Demos · education | ~ Complex apps | ~ Full-stack |
See Python running live in your browser. No install. No server. No surprises.
Made from Laziness of Aswanth R (NodeX-AR)