First public alpha · 0.1.0a1

Typed Python in.
Reactive web apps out.

Bretzel is a full-stack Python framework where the server owns the state and the browser follows—updating only the part of the page that changed.

Python 3.12–3.13MIT licensedNo npm pipeline
counter.py
class Counter(SessionState):
    value: int = 0

def increment() -> None:
    Counter().value += 1

@refreshable(deps=[Counter])
def count() -> None:
    ui.heading(str(Counter().value))

ui.button("+1", on_click=increment)
Counter changedOnly count() re-renders
100+public components
4 + 1server + client state scopes
10example applications
0JavaScript lines in the Kanban app

Mutation is the update API.

Declare what a region reads. Change typed state anywhere on the server. Bretzel finds the dependent region, renders it, and swaps that fragment in the browser.

01 · DECLARE

Typed state

Choose the scope that matches the lifetime: page, session, user, app, or client-only.

02 · DEPEND

Targeted regions

deps= makes the relationship explicit, so updates stay local instead of rerunning the app.

03 · MUTATE

One source of truth

No manual refresh call. No second client store. Mutating state is enough.

One Python app.
A real web stack.

Rich components and server-driven HTML, without turning your application into a JavaScript build project.

Typed stateDeclared dependencyHTML fragmentBrowser swap

Multi-user by declaration

Add broadcast= when a mutation should reach other open windows. Bretzel sends the update over SSE—no polling and no subscription code. The Kanban example uses this for shared drag-and-drop and undo/redo.

Batteries included

Forms, overlays, navigation, data tables, server-rendered SVG charts, security headers, signed actions, OAuth/OIDC doors, and more.

Built to be inspected

bretzel describe exposes the exact API. bretzel check catches structural mistakes, including a deep application check.

Where Bretzel fits.

It sits between script-style app tools and a hand-built frontend: a Python-native application model with explicit state and targeted rendering.

vs NiceGUI

Bretzel does not keep a per-tab server-side UI object tree. Typed state and declared dependencies determine which HTML region is rendered and sent.

vs Reflex

Bretzel serves HTML fragments directly instead of compiling your Python app into React. There is no Node or Bun build pipeline to operate.

vs FastHTML

Bretzel adds a typed state model, targeted reactive regions, and 100+ integrated components on top of the server-rendered approach.

Early, useful, and honestly alpha.

Bretzel 0.1.0a1 is the first public alpha. APIs may change, and the project currently has one maintainer. It is ready for people willing to build a small internal tool, find the rough edges, and shape the model with real feedback.

Take it for a spin.

Install the alpha, generate an app, and run it locally. Start small; bring back the confusing parts.

pip install bretzel