1
Install the Preswald SDK
Need the latest version? Upgrade anytime:
2
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
3
Write Your First App
Open This simple example demonstrates Preswald’s key features:Open your browser and navigate to http://localhost:8501. Your app will run entirely in the browser, with no server required.
hello.py
and edit it with the following content:- 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:4
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