Project types
Shiny for Python
Shiny for Python web applications from the framework/shiny_python blueprint
Overview
The shiny (shiny_python) project type scaffolds an interactive Shiny for Python web application from the built-in framework/shiny_python blueprint on Framework Cloud. Creating it requires signing in with cloud_login().
Directory layout
my-app/
├── data/ # application datasets
├── scripts/ # data preparation scripts
├── tests/ # application tests
├── www/ # static assets (CSS, images)
├── app.py # Shiny UI and server definition
├── README.md # run instructions
├── AGENTS.md
├── pyproject.toml
└── settings.yml
The app doesn't call fw.scaffold(), so it has no scaffold.py. framework.db appears when something first records to it, such as fw.cache().
Project creation also writes .env, .gitignore, the framework-packages and git-workflow AI skills, and an initial git commit.
Starter application
app.py defines a runnable ui.page_sidebar() app titled with the project name, pairing a row-count slider in the sidebar with a rendered DataFrame card.
Included packages
pyproject.toml includes the shiny-python package set:
| Package | Role |
|---|---|
shiny |
Web application framework |
shinywidgets |
Jupyter/HTML widget integration |
plotly |
Interactive charts |
pandas |
Tabular data manipulation |
Add the same bundle to an existing project with package_set_add():
import framework as fw
fw.package_set_add("shiny-python")
Project creation
Sign in to Framework Cloud and call new_project() with type="shiny" (or type="shiny_python" / blueprint="framework/shiny_python"):
import framework as fw
fw.cloud_login()
fw.new_project("My App", "~/code/my-app", type="shiny")
Command-line equivalent:
python -m framework create --name "My App" --path ~/code/my-app --type shiny
You can also open the Shiny for Python blueprint on Framework Cloud, click Create project, and scaffold locally from its project token:
fw.new_project(key="fw_...", location="~/code/my-app")
See New projects for blueprint and token options.
Local server
Install dependencies with uv sync, then start the live-reloading development server from the project root:
uv run shiny run --reload app.py
Shiny serves the app locally (typically http://127.0.0.1:8000) and reloads automatically on file changes.