🐵 Preswald is a full-stack platform for building, deploying, and managing interactive data applications. It brings ingestion, storage, transformation, and visualization into a simple SDK, minimizing complexity while maintaining flexibility for both prototyping and production-grade use cases.
🐵 Your lightweight companion for building simple, interactive, and dynamic data apps in Python.
Preswald is a full-stack platform for building, deploying, and managing interactive data applications. It combines ingestion, storage, transformation, and visualization into one lightweight and powerful SDK. Whether you’re prototyping internal tools or deploying production-grade apps, Preswald reduces complexity and cost without compromising flexibility.
preswald.toml
.First, install Preswald using pip. https://pypi.org/project/preswald/
pip install preswald
Start your journey with Preswald by initializing a new project:
preswald init my_project
cd my_project
This will create a folder called my_project
with all the basics you need:
hello.py
: Your first Preswald app.preswald.toml
: Customize your app’s settings and style.secrets.toml
: Keep your API keys and sensitive information safe..gitignore
: Preconfigured to keep secrets.toml
out of your Git repository.Time to make something magical! Open up hello.py
and write:
from preswald import text, connect, get_df, view
import pandas as pd
# Render Markdown content
text("# Welcome to Preswald")
# Connect to a CSV source
connect()
df = get_df("sample_data")
# Display the data as a table
view(df)
Now the fun part—see it in action! Run your app locally with:
preswald run hello.py
This command launches a development server, and Preswald will let you know where your app is hosted. Typically, it’s here:
🌐 App running at: http://localhost:8501
Open your browser, and voilà—your first Preswald app is live!
Once you’ve built and tested your app locally, deploying it to the cloud is just as simple. Preswald integrates with Google Cloud Run, allowing you to host your app in a scalable, serverless environment with just one command.
To deploy your app, set up Google Cloud credentials and a project. Then, run:
preswald deploy hello.py --project <your-gcp-project>
Once deployed, you’ll see a URL where your app is live, for example:
🌐 App deployed at: https://your-app-name-abc123.run.app
from preswald import text
text("# Hello, World!")
from preswald import text, slider, connect, get_df, view
import pandas as pd
text("# Interactive Dashboard")
connect() # load in sources from preswald.toml
slider_value = slider("Rows to Display", min_val=10, max_val=100, step=10, default=50)
df = get_df("sample_data") # name of csv source in preswald.toml
view(df, limit=slider_value)
Preswald uses preswald.toml
for project settings and theming. It’s straightforward, and it makes your app look polished.
preswald.toml
:[project]
title = "Preswald Project"
version = "0.1.0"
port = 8501
[branding]
name = "Preswald Project"
logo = "images/logo.png"
favicon = "images/favicon.ico"
primaryColor = "#4CAF50"
[logging]
level = "INFO" # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL
format = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
We’re here to help! Check out our full documentation at Preswald Docs.
Check out CONTRIBUTING.md.
Preswald is licensed under the Apache 2.0 License.