Glossary

Short definitions for terms that show up across Stario docs and code.

Package layout

Stario splits compile-time URL building from HTTP wire code:

Import fromUse for
starioDaily handler types: App, Context, Writer, UrlPath, AssetManifest, StaticAssets, Span, Relay, exceptions
stario.routingURL language only (UrlPath, normalize_path) — safe in routes modules and templates without pulling HTTP
stario.httpRequest/response types, Router, normalized_location; embed Server from stario.http.server
stario.staticassetsSame as root re-exports; explicit when documenting asset pipelines
stario.responses / stario.cookiesWriter helpers
stario.datastardata, at, SSE, read_signals, ModuleScript
stario.markupHTML/SVG trees (from stario.markup import html as h)

from stario import UrlPath and from stario.routing import UrlPath are equivalent.

For multi-file app conventions, see Structuring larger applications (general tree + chat-room reference layout).

Terms

TermMeaning
AppThe concrete HTTP application type (Router + __call__, on_error, create_task, app.shutdown, shutting_down). See Runtime.
AssetManifestScans a static directory at construction (typically module level), fingerprints files, and builds URLs with href(). See Static assets.
AttrsPre-rendered opening-tag attribute bytes from stario.markup helpers (classes, styles, data, aria) and from stario.datastar.data for Datastar attributes. See HTML.
BootstrapAsync generator bootstrap(app, span) with a single yield, loaded by the CLI as module:callable; wires routes, assets, and shared services. See Application lifecycle.
Context (c)Per-request: app, req, span, route, state, plus disconnect/shutdown helpers (closing, alive()). See Request and context.
DatastarBrowser runtime plus stario.datastar (attributes, actions, signals, SSE). Datastar reference.
Handlerasync def handler(c: Context, w: Writer) -> None. See Handlers, context, and the writer.
HTMLDocument trees built with stario.markup. HTML reference.
Middleware(inner: Handler) -> Handler; composed at registration time with app.use(pattern, *middleware). See Routing — Middleware.
RelayIn-process pub/sub with dotted subjects; not a cross-process broker. Toolbox — Relay.
Route trieMatcher for host segments, path segments, and HTTP method. Routing.
ServerAsyncio listener around an App; import from stario.http.server. See Runtime — Server.
SignalsJSON-shaped client/server state in Datastar. Datastar.
SSEstario.datastar.SSE — one server-sent event stream per response, bound to a Writer.
Span / event / attributeTelemetry primitives on the span handle. Telemetry.
StaticAssetsServes files from an AssetManifest; call register(app) to attach GET/HEAD routes. See Static assets.
TracerCreates spans and exports finished records; TTY, JSON, SQLite, NoOp, or custom. Telemetry.
UrlPathTyped path (and optional host) pattern; pass host= when creating the pattern (UrlPath("/api", host="…")), then call href() for URLs. See Routing.
Writer (w)Outbound HTTP: status, headers, body, streams. Responses — Writer.