For a decade, "Python in the browser" was a graveyard of transpilers (PyJS), dead plugins (Silverlight), and academic experiments.
But with WebAssembly and Pyodide, we have finally arrived at a party that used to be JS-only. We can now ship a full Python runtime AND ecosystem to the client. However, moving from a "Hello World" demo to a production application that survives the front page of Hacker News is a minefield.
This talk moves beyond demo hype to dissect the architecture of a real-world SPA that runs complex Python logic in the user's browser, with full JS/TS intercompatibility.
We start with a brief, honest history of the attempts to bring Python to the web, highlighting why previous attempts failed and why the current approach is working, citing examples from the open-source ecosystem.
Then, we open the hood on a production-grade case study:
- The Build Pipeline: How to correctly leverage CDN and build a robust distribution with wheels from PyPI, package them into versioned, cache-busted bundles, and manage dependencies strictly.
- The Integration: Keeping the page responsive and SEO optimized with SSR and Web Workers. We show how to orchestrate Svelte and Vite using Comlink for seamless RPC between the JS main thread and the Python worker. Plus, leveraging Pydantic + OpenAPI for TypeScript safety.
- The "Real Talk": The cost of doing business. We discuss the realities of download sizes, memory leaks, and bridging the gap between Python error tracking and browser debugging. Many lessons learned.
Attendees will leave with a proven blueprint for bridging backend power with frontend interactivity, sharing code and bridging Python to new frontiers.