Stario / Server

Keep every step visible.

Stario is a Python framework boiled down to the essentials. It keeps routes, lifecycle, and telemetry explicit, so you can focus on delivering useful software—not only writing code.

One file. One visible path.

Copy it. Run it. Follow every step.

There is no decorator scan, generated registry, or hidden application object. The code you read is the program the server runs.

main.py
import stario.responses as responses
from stario import App, Context, Route, Span, Writer
 
HOME = Route.get("/")
 
async def home(c: Context, w: Writer) -> None:
    c.span.attr("route.name", "home")
    with c.span.step("response.text"):
        responses.text(w, "Hello, world!")
 
async def bootstrap(app: App, span: Span):
    span.attr("app.name", "hello")
    app.add(HOME, home)
    yield
Runuv run stario watch main:bootstrap

Built to stay legible

A small API that shows its work.

Stario keeps the important structures visible. You can follow how the server starts, how a request moves, where time is spent, and which decisions still belong to your application.

01

Explicit by design.

Routes are values, handlers are async functions, and registration happens in one place. There are no hidden decorators or automatic side effects. The code shows what runs.

02

A lifecycle you can follow.

Bootstrap shows startup before yield and teardown after it. Each request moves through Context, your handler, and Writer. Graceful shutdown follows the same visible path.

03

Fast on purpose.

The built-in asyncio HTTP server keeps routing and response writing close to the wire. A repeatable single-worker benchmark keeps performance measurable as Stario changes.

04

Know what the application is doing.

Spans cover startup, requests, steps, events, and failures. When work is slow or breaks, the evidence stays with the path so you can improve the software from real behavior.

05

Focus on the application.

Stario handles sockets, HTTP parsing, routing, responses, static assets, and shutdown. You choose the data model, validation, authentication, product rules, and deployment.

What simple can become

The parts stay visible as the app gets interesting.

See the live collaborative Tiles application on The Stario way, then open the walkthrough to follow its routes, SSE subscription, state, and telemetry.

Build the first route.

The tutorial includes the handler, HTML response, asset, and test.