Quickstart
Build interactive data apps that run locally in the browser with Preswald
Install the Preswald SDK
Set Up Your First Project
Run these commands to bootstrap your first Preswald app:
This will create a scaffolded project with the following:
hello.py
: Your main Python script where you’ll write your app logicpreswald.toml
: Configuration for your app’s metadata, runtime settings, and brandingsecrets.toml
: Secure storage for sensitive data like API keysdata/
: Directory for your input data filesimages/
: Directory for custom branding assets.gitignore
: Pre-configured to exclude sensitive files from version control
Write Your First App
Open hello.py
and edit it with the following content:
This simple example demonstrates Preswald’s key features:
- Python-based development with built-in UI components
- Direct data access with DuckDB integration
- Reactive updates powered by Pyodide in the browser
Run It Locally
Launch your app locally with this command:
Open your browser and navigate to http://localhost:8501. Your app will run entirely in the browser, with no server required.
Export Your App
When you’re ready to share your app, export it as a static site:
This creates a dist/
folder containing your complete app, including:
- All Python code (bundled via Pyodide)
- Data files and DuckDB queries
- UI components and styling
- Everything needed to run offline in any modern browser
You can now share this folder directly or host it on any static hosting platform.