How-tos
Practical, goal-oriented guides for solving specific problems with Stario.
For narrative walkthroughs and API depth, see Tutorials, Reference, and Explanation.
Not using Datastar? Plain HTML handlers and SSE without Datastar are first-class—see The Stario way and Realtime tiles.
Datastar (signals and forms)
This section is the Datastar path: reactive UI, signals, and SSE patches.
Datastar: Reading and writing signals — wire-format reads, validation at your boundary, and pushing updates with
patch_signals/ SSE.
Infrastructure and security
Authentication with cookie sessions — signed cookies and
c.state.Injecting dependencies — closures, services, and
bootstrap(database example).Deployment: Containers, TLS, and safe releases —
stario serve, Docker, TLS with Caddy, Unix sockets.
Local development and observability
Hot reload for local development —
stario watch, watch paths, and optional dev resync.Mapping errors to HTTP responses —
app.on_errorand stable status bodies.Getting insights from SQLite tracer — SQL over local span data.
Layout and testing
Structuring larger applications — file layout, mounts, and
url_forwith static assets.Testing with TestClient — in-process HTTP tests.