Datasette Lite rewritten with service workers runs full server-side Datasette Python app in the browser
Running the full server-side Datasette Python app in the browser with service workers and Pyodide
Simon Willison released a complete rewrite of Datasette Lite that uses service workers and Pyodide to run the full server-side Datasette Python app in the browser, making it nearly indistinguishable from the real server application. The rewrite lets users load any SQLite database, JSON, CSV or SQL file, pick from over 100 SQLite versions, select Datasette releases from PyPI or GitHub commits, and install plugins from PyPI or wheel URLs. The original 2022 version relied on innerHTML injection, which broke JavaScript features; the service worker approach routes requests through session-prefixed URLs to a dedicated web worker per tab.
Source:Simon Willison · simonwillison.net