Datasette Lite is rewritten to run the full Datasette app in the browser

Simon Willison has released a complete rewrite of Datasette Lite, his port of the Datasette Python application that runs directly in the browser using WebAssembly and Pyodide. The new version is built on service workers. Willison says it is now almost indistinguishable from the real server-side application.
A carefully crafted URL to lite.datasette.io can now do several things: load client-side Datasette to browse any SQLite database, JSON file, CSV file or SQL script; pick a released Datasette version from PyPI; load a specific commit, tag or branch from the Datasette GitHub repository; pick from over 100 versions of SQLite; and install extra Datasette plugins from PyPI or from URLs to wheel files, including JavaScript visualization tools. Willison calls this a fantastic way to link to demos of work-in-progress features or bug reproductions without spinning up a web server.
His worked example is one long URL. ?install=datasette-maplibre adds that plugin from PyPI (the parameter can be repeated for more plugins). &url= points to a SQLite database, here a database of GeoJSON country shapes hosted in a Gist, because the file needs open CORS headers and Gists provide those. &metadata= loads a metadata.yml that adds HTML descriptions to tables and the homepage. The fragment hash opens the /demo/capitals_and_countries view and passes a second fragment to the map plugin, which sets the zoom location and colours the shapes by the continent column. After a short loading screen, the result is Datasette running the new datasette-maplibre plugin with a combined map and individual boundary maps in a table.
Willison already uses it in Datasette development. In an issue about a pagination bug, he posted Datasette Lite links showing the broken behaviour on ref=1.0a42, where clicking next gives an empty second page, and the fixed behaviour on 1.0a43.
The first version launched in 2022, partly as a joke, and was a hack. It ran Datasette in a Pyodide web worker, simulated requests through it and injected the resulting HTML into the page with innerHTML. Anything that needed JavaScript broke, because script tags added through innerHTML do not execute, and the worker approach could not load extra JavaScript or CSS files.
The new version uses service workers, which let JavaScript intercept HTTP requests and answer them from client-side code. Datasette Lite registers one service worker for the whole lite.datasette.io domain. The parent page creates an iframe that requests Datasette pages from URLs such as /app/aa94e6851595/ (homepage), /app/aa94e6851595/data/places (a table page), and /app/aa94e6851595/-/static/app.css (CSS). These are ordinary Datasette URLs with a session prefix. The prefix exists because of multiple tabs: the service worker is shared by all of them, and routing everything to one Datasette instance would make every tab share plugins and settings. Instead the parent page generates a random session ID, and the service worker uses it to route requests back through the parent page to a web worker running a dedicated Datasette instance for that session. A web worker is still needed because Pyodide inside a service worker could not maintain state beyond around 30 seconds, depending on the browser. Willison had Claude Fable 5.2 generate several SVG diagrams of this, now in the Datasette Lite README. The system began in May as an AI research spike generated with Claude Opus 4.8. He only felt familiar enough with it to ship it to production in November, with Claude Fable 5.2.
A bonus feature, added the night before the post, lets you choose the SQLite version. It grew out of investigating a potential bug in SQLite. Datasette is meant to work with any released SQLite since 3.25 (September 2018), and there have been 87 further releases since. Willison says running a specific version used to be fiddly on his Mac, while WebAssembly lets him load a custom SQLite build in the browser and discard it when the tab closes. His new repository, datasette/pysqlite3-wasm-wheels, holds WebAssembly-compiled pysqlite3 wheels for 163 SQLite versions, with names like pysqlite3-0.6.2-3.54.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl (SQLite 3.54.1, the most recent). The new ?sqlite= parameter takes a version number such as 3.54.1, finds the matching wheel, installs it into Pyodide and configures Datasette to use it. He also had Claude Fable 5.2 build a tool for comparing a SQL query across selected SQLite versions; the example shows select json_object('a', (select json_array(1))) behaving differently in 3.54.0 and 3.54.1.
Willison argues the trick is not specific to Datasette. Almost any Python application should be able to run in the browser this way, as a cheap route to preview environments, feature demos and bug reproductions. C and Rust extensions used to block this, but he says any good coding agent can now compile them to Pyodide-compatible WebAssembly, and they can be published to PyPI as of PEP 783 in April 2026. The catch is databases: SQLite is no problem, while PostgreSQL or MySQL in WebAssembly is possible but a path less trodden. He hopes WebAssembly preview environments become a common pattern in the Python ecosystem.
Key facts
- Datasette Lite, Simon Willison's browser port of Datasette, is fully rewritten around service workers, so JavaScript and CSS now work; he calls it almost indistinguishable from the server-side app.
- URL parameters can pin a Datasette release, commit, tag or branch, install plugins from PyPI or wheel URLs, and load SQLite, CSV, JSON or SQL script data.
- Each tab gets a random /app/
/ prefix and its own web worker running a dedicated Datasette instance, because Pyodide in a service worker could not keep state beyond around 30 seconds. - A new ?sqlite= parameter selects a SQLite version; the datasette/pysqlite3-wasm-wheels repository holds WebAssembly wheels for 163 SQLite versions, and the feature list says over 100 are selectable.
- Willison says almost any Python app should be able to do the same; databases like PostgreSQL or MySQL in WebAssembly are possible but less trodden.
Why it matters
The 2022 version of Datasette Lite was a hack that broke on any feature using JavaScript. The rewrite closes that gap, so a Python web app now runs in a browser tab with its scripts, styles and plugins intact. That turns a link into a complete demo: a specific Datasette version, plugins, data and even SQLite version, with no server to run. Willison also argues the approach is general and could make WebAssembly preview environments a common pattern for Python projects.
Who it affects
Datasette developers and plugin authors, who can share a link to a work-in-progress feature or a bug reproduction; Willison already does this in a Datasette issue about a pagination bug. People debugging SQLite behaviour can compare releases without building them locally. Maintainers of other Python applications are the wider audience for his claim that the same trick should work for them.
How to use it
Build a URL on lite.datasette.io. Use ?install=
How solid is it
This is a first-person release post by the author, with a working demo URL (datasette-maplibre) and a concrete bug-and-fix pair of links, and he says he already uses it in development. No performance figures, browser test matrix or adoption numbers are given. The post says the system began in May as an AI research spike with Claude Opus 4.8 and that he trusted it enough to ship in November with Claude Fable 5.2. The claim that other Python apps can do the same is stated as 'should be able to', not demonstrated. The feature list says over 100 SQLite versions can be picked, while the wheels repository has 163 versions; the post presents both figures as written.
Risks and caveats
The design has many moving parts: a service worker, a parent page, an iframe and per-session web workers, and a web worker is still required because Pyodide in a service worker lost state after around 30 seconds, depending on the browser. Data loaded by URL must be served with open CORS headers. Databases other than SQLite are a catch: PostgreSQL or MySQL in WebAssembly is possible but less trodden. The SQLite picker was added the night before the post, as a bonus feature.
“it's now almost indistinguishable from the real server-side application”
— Simon Willison, simonwillison.net