Quickstart5 minutes
Your first Bretzel app
Create the project, run the server, then edit a page. At the end you will have completed the essential loop: describe the interface in Python and watch the browser follow.Install the public alpha
Bretzel 0.1.0a2 is available on PyPI. Use Python 3.12, 3.13 or 3.14; the API may change between alpha releases.python -m pip install bretzel
1
Create the project
bretzel new hello-bretzel
cd hello-bretzel
python -m venv .venv
`bretzel new` creates a minimal application in a new folder. It refuses to overwrite an existing directory.2
Activate the environment
Windows PowerShell.\.venv\Scripts\Activate.ps1
macOS or Linuxsource .venv/bin/activate
3
Install and run
python -m pip install -e .
bretzel dev
Open `http://127.0.0.1:8000`. `bretzel dev` watches your files and restarts the application after every change.4
Edit the page
Open `app/features/home.py`, change the heading, and save. The browser reloads the application.ui.heading("My first Bretzel", level=1, size="4xl")
What the generator created
hello-bretzel/
├── app/
│ ├── main.py # configures the application
│ └── features/
│ └── home.py # your first page
├── pyproject.toml
└── README.md