Recipes¶
Short, copy-pasteable apps for common workflows. Prefer these after Build your first app and before the kitchen-sink reference app.
Each recipe page leads with a Try it (simulated) Demo/Code tab (often a minimal
in-memory variant — labeled on the page when it differs from the recipe), then a
no-clone curl … -o app.py path, then the monorepo uv sync command.
Recipes vs Cookbook
Recipes (this section) are full mini-apps you can run. The Cookbook is short pasteable snippets inside an existing app — not standalone servers.
| Recipe | What it shows | Limits |
|---|---|---|
| Composable app | Components split across importable Python modules | No custom CSS; app.py owns routes and data |
| Common combinations | Auth + CRUD; validation fragments; dashboard filters + pages; upload + job polling | Four single-file learning apps; in-memory substitutes are labelled |
| Notes + SQLAlchemy | Persist notes with SQLAlchemy + SQLite | Create + list + delete (not a full admin) |
| Session auth | Login / logout with Starlette sessions | Demo credentials only; / redirects to login |
| File upload | CSRF-safe multipart upload | In-memory / local demo — no durable store |
| Jobs poll | Poll + job_status_response |
In-memory backend — single process only |
| Model demo | Synthetic classifier (ModelDemo / inference workflow) |
Deterministic local scores; clone the repo |
| Flask Refresh | hedron new --flask + HTMX Refresh |
Adapter host (no FastAPI) |
| Django Refresh | hedron new --django + HTMX Refresh |
Django >=5.2,<6 |
Also useful:
- Live interaction — polling is Supported; SSE/WS paths are Experimental
- CRUD tutorial — Notes CRUD walkthrough (not the kitchen-sink reference app)
- OIDC login —
authorization-code loop with
hedron[auth](you own the IdP) - Runnable matrix — every example folder and how to run it
Not recipes
Version-stamped dirs (dashboard-0.17,
data-app-0.15, …) are maintainer exit scenarios, not product tutorials.
Simulated UI patterns are Read the Docs simulations — not a live
Hedron process.