From Graveyard to Glory

Production Python in the Browser

Mahmoud Hashemi

PyCon US 2026

A deep dive on
hand-building
a browser Python app,
byte by byte

JK

/plan i’d like to have a “python-in-browser” setup that lets me test regexes using python’s re module, for regex testing with python’s regex specifically. research and propose the best architecture for this in 2026. apply the color scheme #FDA500 for accent, #3FABCC for action (light) and #3F8BA3 for action (darker, for like hover). We want a dark mode, so invert and convert as necessary.

One prompt.
One plan.
$16 in tokens.

yak.party/pyregex

What Just Happened?

Talk over?

Have I been replaced by AI?

😂

Agents don’t give you the most important parts.

This Talk

What's coming up
01
The WHY
Neither syntax nor dogma.
02
The History
A decade of attempts. What changed.
03
Five Gaps
What the agent doesn’t know about production.
04
The Future
A glimpse at what’s coming.
05
Reflections
What this all adds up to.

Part One · of Four
01

The WHY

Not syntax. Not dogma.

Python is awesome!
(and JavaScript is terrible)

syntax isn’t a reason
Python is awesome!
(and JavaScript is terrible)
and neither is dogma or aesthetics

Why Browser Python?

§1 WHY

Actually good reasons:

  • Budget - free compute on every device
  • Sandboxing + Security - no server compromise
  • Reproducibility - same results, client-side
  • Python is Awesome!! - The ecosystem

Part Two · of Four
02

The Graveyard

A brief, honest history of Python in the browser

The Graveyard

Years Project Approach
2009-2015 PyJS / Pyjamas Transpiler + Qt/GTK widgets
2010-2021 Silverlight / IronPython Browser plugin
2013-2019 PyPy.js Compile PyPy to JS
2013-2021 RapydScript Python-like to JS compiler

Still Kicking

Years Project Approach
2009-present JS reimplementation, still chasing Python 3
2014-present Runtime transpiler, maintained (Python 3.14), no C extensions
2016-present Transcrypt Python-to-JS transpiler, active (v3.9.4)

Alive, but still niche.

What Was Missing?

Every previous attempt lacked at least one of:

  1. Python syntax
  2. Python stdlib
  3. Python ecosystem (pip install)
  4. DOM access
  5. Bidirectional JavaScript interop

Then: WebAssembly + Pyodide

2011 - Empythoned (Replit ): Emscripten + CPython.

2017 - WebAssembly ships in all four browsers (overtaking Emscripten in Google Search results)

2019 - Pyodide: CPython compiled to WASM (Mozilla Research)

2020 - micropip: pip install in the browser (Pyodide 0.15)

2026 - v0.29. CPython Tier 3 WASM support (PEP 816)

Built on

Project What Link
JupyterLite Full Jupyter in browser (official subproject, Feb 2026) jupyterlite.readthedocs.io
Marimo Reactive notebooks, WASM export marimo.io
Gradio-Lite ML demos in browser (Hugging Face) huggingface.co
Stlite Streamlit → WASM, PWA, Electron github.com/whitphx/stlite

Common thread: Mostly directly about Python in the user’s browser.

Part Three · of Four
03

What the agent doesn't know

What we built (and what the agent didn't give us).

Production Python in the browser

A couple projects I’ve shipped.

glompad: yak.party/glompad

Side project: Data exploration with glom

FinFam: finfam.app

Work: Like GitHub for consumer finance.

NB “Python” isn’t the point, it’s just the best tool for this job.

What the Agent Built

The architecture

What’s Missing?

Five gaps to close

  • 1 Testing Playwright, CI, and git hooks
  • 2 UI Framework Svelte, compilers, and linters
  • 3 Typed boundaries Comlink and worker RPC
  • 4 Telemetry error reporting and closeable loops
  • 5 Worker State Management state machine + interrupts

Gap 1: Playwright + CI

Browser Python apps need browser tests.

  • Playwright: E2E across 3 browsers
  • GitHub Actions: CI on every push
  • Pre-commit hooks: catch problems before they hit CI

Gap 2: UI Framework

Compilers, linters, and plugins the agent left out

  • Svelte: compiler catches errors at build time, not runtime
  • Plugins: TypeScript, ESLint, Prettier in the pipeline
  • Hook into pre-commit + CI (the agent didn’t wire these up)

Every layer of the build is a verification step.

Gap 4: Telemetry

Closeable loops: The browser is an environment. Treat it like one.

Gap 5: Worker State Management

Interop and architecture

The agent gives you isReady and isLoading. Production needs a state machine:

SharedArrayBuffer enables fast interrupts like Ctrl-C (but requires COOP/COEP headers).

Part Four · of Four
04

The Future

A glimpse of what's coming.

What’s Coming

§4 THE FUTURE
What Why It Matters
CPython Tier 3 WASM (PEP 816) Official upstream support
emscripten-forge Recreating conda in WASM
Cloudflare Pyodide in V8 isolates.
Web UX doesn’t stop at the browser.

Edge Computing

§4 THE FUTURE

server → edge → browser

Cloudflare Workers: Pyodide at the edge - ~1s cold starts via memory snapshots

Part Five · of Four
05

Reflections

What this all adds up to.

Ps and Qs

§5 REFLECTIONS

Verifiability: the thread that tied our five gaps together

  • Tests - Playwright E2E, not just unit tests
  • Types - Comlink typed boundaries
  • Compilers - Svelte, TypeScript, Rollup
  • Linters - ESLint, Prettier, CI checks

Close your loops so you can focus on creating.

Building in the age of plastic software

§5 REFLECTIONS

Python won. The language of good enough.

Good enough is glorious.

What hasn’t changed: Reach correctness first. Optimize later.

With every passing release, Python is becoming less and less the bottleneck.

The prototype is the product.

Go forth and build

§5 REFLECTIONS

Now is the time to build first-class apps around Python’s top-notch libraries.

Got a favorite Python library? Build a web application around it.

Beautiful, interactive web UX.

Rock-solid Python business logic.

Learning in the age of agents

Python may be the language agents are best at writing.

Python may have won, but what about us?

An agent-assisted human beats a pure agent. Every time.

Ecosystem and community are real advantages. Don’t let them disappear.

If you believe one good turn deserves another…

goodturn.ai