gitmyhub

preswald

Python ★ 4.3k updated 18d ago

Preswald is a WASM packager for Python-based interactive data apps: bundle full complex data workflows, particularly visualizations, into single files, runnable completely in-browser, using Pyodide, DuckDB, Pandas, and Plotly, Matplotlib, etc. Build dashboards, reports, and notebooks that run offline, load fast, and share like a document.

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.

PythonPyodideWebAssemblyDuckDBTOMLsetup: easycomplexity 2/5

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.

Where it fits