[KongchangAI]
Product

Datasette Lite

A browser-based implementation of Datasette that runs Python in WebAssembly via Pyodide, allowing CSV and SQLite files to be loaded and the full Datasette application to run without a local installation; it also supports JavaScript plugins.

Core Facts

Timeline (last 90 days)

Nov 17

This system was initially a research prototype that the author generated with Claude Opus, and it was only formally put into production after the author became sufficiently familiar with the overall mechanism.

Unverified50%
Nov 17

The new version of Datasette Lite registers a Service Worker that acts on the entire lite.datasette.io domain, intercepting HTTP requests and having client-side code respond; the parent page creates an iframe and makes requests to standard Datasette URLs with an /app/<session>/ prefix.

Unverified50%
Nov 17

The /app/<session>/ prefix is used for multi-tab isolation: the Service Worker is shared across all tabs, and the parent page generates a random session ID for each tab to route requests to the Datasette instance in that session's dedicated Web Worker.

Unverified50%
Nov 17

Datasette Lite supports customizing instances via URL parameters: ?install= installs plugins from PyPI (multiple can be passed repeatedly), ?url= loads any SQLite database that provides open CORS headers, ?metadata= loads metadata.yml, and fragment hashes are used to locate views and control the map plugin.

Unverified50%
Nov 17

The server hosting the SQLite file loaded by the ?url= parameter must return the Access-Control-Allow-Origin response header; otherwise the browser will not allow Pyodide's fetch request to read its contents.

Unverified50%
Nov 17

The author created the datasette/pysqlite3-wasm-wheels repository, providing WebAssembly-compiled pysqlite3 wheels for 163 different SQLite versions; when a ?sqlite= version number is passed, Datasette Lite resolves the corresponding wheel path, downloads it, and installs it into the Pyodide environment.

Unverified50%
Nov 17

Simon Willison released a complete Service Worker–based rewrite of Datasette Lite, which the author says is almost indistinguishable from a real server-side application.

Unverified50%
Nov 17

The first version of Datasette Lite was created in 2022, running Datasette in a Pyodide Web Worker and injecting the generated HTML into the top-level page via innerHTML.

Unverified50%
Nov 17

The old version of Datasette Lite injected content via innerHTML, which caused script tags not to execute, Workers to be unable to load additional JS and CSS, and a large number of JavaScript-dependent plugins and interactive features to fail.

Unverified50%
Nov 16

The datasette-maplibre demo can run in the latest version of Datasette Lite, loading the plugin and demo database in the browser via Pyodide and WebAssembly, with no local installation required.

Unverified50%

4 more timeline events

All Facts (14)

Partially Verified

Datasette Lite is a version of Datasette that runs in the browser, using Pyodide to compile the Python runtime to WebAssembly and execute it in the browser, with no need to install a local Python environment or start a server.

65%
Unverified

This system was initially a research prototype that the author generated with Claude Opus, and it was only formally put into production after the author became sufficiently familiar with the overall mechanism.

50%
Unverified

The first version of Datasette Lite was created in 2022, running Datasette in a Pyodide Web Worker and injecting the generated HTML into the top-level page via innerHTML.

50%
Unverified

The old version of Datasette Lite injected content via innerHTML, which caused script tags not to execute, Workers to be unable to load additional JS and CSS, and a large number of JavaScript-dependent plugins and interactive features to fail.

50%
Unverified

The new version of Datasette Lite registers a Service Worker that acts on the entire lite.datasette.io domain, intercepting HTTP requests and having client-side code respond; the parent page creates an iframe and makes requests to standard Datasette URLs with an /app/<session>/ prefix.

50%
Unverified

The /app/<session>/ prefix is used for multi-tab isolation: the Service Worker is shared across all tabs, and the parent page generates a random session ID for each tab to route requests to the Datasette instance in that session's dedicated Web Worker.

50%
Unverified

Datasette Lite supports customizing instances via URL parameters: ?install= installs plugins from PyPI (multiple can be passed repeatedly), ?url= loads any SQLite database that provides open CORS headers, ?metadata= loads metadata.yml, and fragment hashes are used to locate views and control the map plugin.

50%
Unverified

The server hosting the SQLite file loaded by the ?url= parameter must return the Access-Control-Allow-Origin response header; otherwise the browser will not allow Pyodide's fetch request to read its contents.

50%
Unverified

The datasette-maplibre demo can run in the latest version of Datasette Lite, loading the plugin and demo database in the browser via Pyodide and WebAssembly, with no local installation required.

50%
Unverified

The README online demo of datasette-vega 0.7 now links to Datasette Lite, using FiveThirtyEight's airline-safety dataset to demonstrate the bar chart effect.

50%
Unverified

Simon Willison released a complete Service Worker–based rewrite of Datasette Lite, which the author says is almost indistinguishable from a real server-side application.

50%
Unverified

The author created the datasette/pysqlite3-wasm-wheels repository, providing WebAssembly-compiled pysqlite3 wheels for 163 different SQLite versions; when a ?sqlite= version number is passed, Datasette Lite resolves the corresponding wheel path, downloads it, and installs it into the Pyodide environment.

50%
Unverified

Datasette Lite previously could not load JavaScript plugins, and has just gained the ability to run such JS plugins, with datasette-vega being a beneficiary.

50%
Unverified

The primary motivation for the datasette-vega 0.7 release was compatibility with the latest Datasette alpha version, along with some visual tweaks to work better in Datasette Lite.

50%

Source Articles