Each how-to does one job and assumes you have read Hello world. Pick the one you need.
Building#
Structuring apps — a folder layout that grows from one file to many features.
Static assets — serve CSS, JavaScript, and images with cache-safe URLs.
Datastar from Python — attributes and actions from Python, read and validate signals, patch HTML and signals over SSE.
Sessions and login — sign a user in with a cookie and middleware.
Passing dependencies — pass a database or a client into handlers without a container.
User uploads — accept files and serve them back.
Error handling — turn exceptions into pages, per prefix.
Running#
Testing with TestClient — in-process HTTP tests, including streams.
Hot reload development —
watchfilesand what it watches.Traces in SQLite — write spans to a SQLite file and query your own traffic.
Deployment — a container image and a reverse proxy.
AI-assisted development — an
AGENTS.mdfor agents that work in a Stario repository.