Stario documentation

Stario is a Python 3.14+ framework for server-rendered web applications. Routes are values, handlers are async functions, responses go through Writer, and telemetry follows the request path. Datastar support is available when an interface needs live updates.

This manual uses four kinds of page. Tutorials teach a path. How-tos solve one job. Explanation says why. Reference is the contract.

Start with one route

Install Stario with uv:

bash
uv init --app my-app
cd my-app
uv add "stario>=4,<5"

Continue with Hello world for the first route, handler, HTML response, and test. Use Realtime tiles when you are ready to add an SSE stream.

If an AI agent will work in the repository, read AI-assisted development and copy AGENTS.md into the project root.

Use the four kinds

The sidebar lists Tutorials, How-tos, Explanation, and Reference. Start with a tutorial. Open a how-to for one job. Use explanation for why, and reference for the contract.

Live example

Tiles is a collaborative painting board from the Stario repository. Each panel below is a separate browser tab connected to the same application.

Try it now: paint in Player 1 or Player 2. The other panel updates through SSE. You can also open the live demo in a separate window.

Live demo

/apps/tiles in two iframes · paint either panel

Player 1
Player 2

The example uses one route for the first HTML response, one long-lived subscription, and one command route. Read Realtime tiles for the implementation.

The other tools

The Stario way explains the shared design defaults. Server is this manual. Hypermedia and Deploy each have their own page and their own book.