Running Python ASGI apps in the browser via Pyodide + a service worker
Simon Willison's Weblog246 字 (约 1 分钟)
87
By running Python ASGI web applications entirely in the browser using Pyodide and a dedicated service worker, this project intercepts all same-origin requests under `/app/` and executes them against the Python app via the ASGI protocol—removing the need for a backend server except for static files. The mechanism is demonstrated with both a FastAPI demo and the full Datasette app, confirming its generality across ASGI apps.
入选理由:使用 Pyodide + Service Worker 实现 ASGI 协议在浏览器内端到端执行,拦截 `/app/` 下所有同源请求并转发至 Python 应用。
FeaturedArticle#Pyodide#ASGI#Service Worker#Datasette#WebAssembly英文