> ## Content Index
> Fetch the complete content index at: https://www.stirup.si/llms.txt
> Use this file to discover other available public pages before exploring further.

# Datasette Lite Runs Python Apps in Browser Using WebAssembly and Pyodide
- URL: https://www.stirup.si/datasette-lite-runs-python-apps-in-browser-using-webassembly-and-pyodi-9e24bec0/
- Published: 2026-11-18T01:32:32.000Z
- Updated: 2026-11-18T01:32:32.000Z
- Description: Datasette Lite, introduced by Simon Willison in 2022, enables running the Datasette Python application directly in the browser using WebAssembly and Pyodide, eliminating the need for a traditional backend.
- Author: Satish Das
- Tags: AI, News, Stirup Research

## Introduction to Datasette Lite and its development

Datasette Lite, introduced by Simon Willison in 2022, represents a novel approach to running the Datasette Python application directly in the browser using WebAssembly and Pyodide. Initially conceived as a humorous experiment, the project has since demonstrated practical value by enabling server-side functionality to operate client-side without requiring a traditional backend. This development leverages service workers and Pyodide to execute Python code in the browser, offering a lightweight alternative to conventional server deployments. The project has evolved from a conceptual idea into a functional tool, showcasing the potential of combining modern web technologies with Python-based data applications. As noted in Simon Willison’s Weblog, the first version was launched in 2022 and has since continued to develop, reflecting ongoing interest in the intersection of web technologies and data science.

## Technical implementation using service workers and Pyodide

The technical implementation of running the full server-side Datasette Python app in the browser leverages service workers and Pyodide to enable a near-native experience. A service worker intercepts requests for Datasette pages, which are prefixed with a unique session ID, such as `/app/aa94e6851595/`. This session ID allows the service worker to route requests back to a web worker that runs a dedicated Datasette instance for that session. The parent page creates an iframe that sends requests to these modified URLs, which include HTML, JavaScript, and CSS assets. This approach ensures that the application behaves similarly to the real server-side version, as noted in the release of a complete rewrite of Datasette Lite using service workers. The service worker acts as a bridge, enabling the browser to handle server-side logic through Pyodide, a Python runtime for the web.

## Handling SQLite versions and compatibility

Handling SQLite versions and compatibility is a critical aspect of running the full server-side Datasette Python app in the browser using service workers and Pyodide. In the past, managing different SQLite versions with Python on a Mac has been a non-trivial process, as noted by developers who have experimented with various workarounds ([Simon Willison](https://simonwillison.net/2026/Nov/17/datasette-lite/?ref=stirup.si)). To address this challenge, the `datasette/pysqlite3-wasm-wheels` repository was created, containing WebAssembly compiled Python wheels for pysqlite3 across 163 different SQLite versions ([Simon Willison](https://simonwillison.net/2026/Nov/17/datasette-lite/?ref=stirup.si)). Datasette Lite now supports a special `?sqlite=` URL parameter, which accepts a version number such as `3.54.1`, resolves the corresponding wheel file path, fetches the wheel, installs it into the Pyodide environment, and configures Datasette to use it ([Simon Willison](https://simonwillison.net/2026/Nov/17/datasette-lite/?ref=stirup.si)).

## Broader implications for Python applications in the browser

Running the full server-side Datasette Python app in the browser using service workers and Pyodide opens new possibilities for Python applications in web environments. As noted, this approach is not limited to Datasette—almost any Python application can leverage WebAssembly and Pyodide to run entirely in the browser. This enables the creation of lightweight preview environments, feature demonstrations, and even bug reproduction tools without requiring server-side infrastructure. The broader implication is that Python’s presence in the browser is no longer constrained by traditional limitations, offering developers a more flexible and accessible way to deploy and test applications. This shift could democratize access to Python-based tools, making them more widely available to users who may not have the resources or technical expertise to run full server-side applications.

## Sources and reporting notes

- [Simon Willison](https://simonwillison.net/2026/Nov/17/datasette-lite/?ref=stirup.si)

Based on published source material. No independent hands-on testing is claimed.