explaingit

structuredlabs/preswald

4,290PythonAudience · dataComplexity · 2/5LicenseSetup · easy

TLDR

Preswald turns Python data scripts into self-contained interactive apps that run entirely in the browser via WebAssembly, no server or Python installation needed by end users.

Mindmap

mindmap
  root((preswald))
    What it does
      Python to browser app
      No server needed
      Offline capable
    Tech Stack
      Pyodide WebAssembly
      DuckDB in-browser
      Python CLI
    Use Cases
      Share dashboards
      Sensitive data tools
      Fieldwork apps
    Audience
      Data analysts
      Non-tech stakeholders
    Setup
      preswald init
      preswald run
      preswald export
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Share a data dashboard with stakeholders who have no Python installed by exporting it as a single static HTML file.

USE CASE 2

Build a field-data tool that works fully offline, no internet or server required.

USE CASE 3

Package sensitive analytics so data never leaves the user's device or hits any server.

USE CASE 4

Distribute interactive experiment results as one portable file anyone can open in a browser.

Tech stack

PythonPyodideWebAssemblyDuckDBTOML

Getting it running

Difficulty · easy Time to first run · 30min

Builder needs pip + Python environment, end users need nothing, they just open the exported HTML file.

Use freely for any purpose including commercial, as long as you keep the copyright and license notices.

In plain English

Preswald is a static-site generator that turns Python data scripts into self-contained interactive apps that run entirely in the browser, no server, no installation required for whoever receives the app. The person building it writes Python code, Preswald bundles everything into a static site that anyone can open and use offline. The technical foundation is Pyodide, a version of Python compiled to WebAssembly so it runs inside a browser, and DuckDB, an in-browser analytics database. Together, these let Preswald apps run full Python data workflows: queries, transformations, and visualizations, all directly in the browser without calling any backend. Data, logic, and UI are bundled into one portable file. Building an app works through a command-line tool: preswald init creates the project structure, preswald run launches a local development server, and preswald export packages everything into a distributable static site. Configuration is handled through a preswald.toml file. App logic is written in Python using built-in components like tables, charts, and forms. A reactive engine tracks dependencies between computations and only re-runs what changed when inputs are updated, keeping the interface responsive without server round-trips. Useful scenarios include sharing dashboards or reports with stakeholders who don't have Python installed, handling sensitive data that must not leave a device, building tools for fieldwork or air-gapped environments, and packaging experiment results as standalone interactive panels. The project is written in Python and licensed under Apache 2.0.

Copy-paste prompts

Prompt 1
I have a Python script that queries a CSV and draws charts. Rewrite it using Preswald components so I can export a standalone HTML app with no backend.
Prompt 2
Using Preswald and DuckDB, write a browser app that lets a user upload a CSV and run SQL queries, showing results in a table component.
Prompt 3
Show me how to build a reactive Preswald app where a slider controls a bar chart that updates without reloading the page.
Prompt 4
Walk me through using preswald export to package my Python data app into a static site I can email to a non-technical stakeholder.
Prompt 5
I handle medical data that must not touch any server. Confirm how Preswald keeps all computation in-browser and help me verify no network calls are made at runtime.
Open on GitHub → Explain another repo

← structuredlabs on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.