Stario - Bringing back the joy of web development
Project description
Stario
Craft realtime hypermedia apps that are a joy to write and ship.
Stario is a small Python framework for enjoyable realtime hypermedia apps. It helps you build web apps where HTTP, HTML, and streaming stay visible in your code. Handlers are plain async functions; routes are registered explicitly; responses go through a dedicated writer. When the UI needs live updates, you can add Datastar and Relay without throwing away the same request/response mental model. The realtime tiles tutorial walks through the full pattern end to end.
Full guides, API reference, and tutorials live at stario.dev. This page is a short orientation for people landing on the repository.
Where Stario fits
Stario is an asyncio-native HTTP stack: you write async handlers and register routes on an App, and the stario CLI runs a built-in HTTP server (TCP or a Unix domain socket). It is not an ASGI application you mount in Uvicorn or Hypercorn; wiring goes through the bootstrap hook, Context, and Writer instead.
Requirements
Python 3.14 or newer is required. The package tracks current Python and the standard library (including APIs the framework builds on) rather than supporting older runtimes.
Quick start
From a template
uvx runs the Stario CLI without a global install. Everything after this is interactive (project name, template, and optional dev server).
uvx stario init
Manual setup
uv init my-app # creates a new uv project (pyproject, layout)
cd my-app
uv add stario
Put this in main.py:
import stario.responses as responses
from stario import App, Context, Span, Writer
async def home(c: Context, w: Writer) -> None:
responses.text(w, "Hello from Stario")
async def bootstrap(app: App, span: Span) -> None:
span.attr("app.name", "example")
app.get("/", home, name="home")
uv run stario watch main:bootstrap
Install with pip install stario if you are not using uv. During startup, bootstrap runs once: register routes there and attach attributes to span (telemetry for the lifecycle). Use stario watch in development so the process reloads when files change; use stario serve for a normal long-running server without reload. See Getting started for project layout and CLI options. For containers, TLS, and production-oriented setup, see Deployment: Containers, TLS, and safe releases.
What you get
- Explicit wiring:
bootstrap(app, span), named routes, no hidden registration. - Sharp primitives:
Contextfor the request,Writerfor the response, HTML viastario.html, telemetry viaspan. - Hypermedia by default: HTML and SSE are first-class; realtime layers are optional when the product needs them.
- Observable runs: spans for startup and requests are part of how you structure apps, not an afterthought.
What Stario is not
No bundled ORM, admin UI, or plugin discovery system. Databases, auth, and brokers stay in your code or thin adapters; the framework stays a focused HTTP and hypermedia core.
Releases
Version history and upgrade notes live in CHANGELOG.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stario-3.2.0.tar.gz.
File metadata
- Download URL: stario-3.2.0.tar.gz
- Upload date:
- Size: 142.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6365e234e2c2b062a8449e0c4ba6cdffaa3008f9909b4e897dfb9d391aacce40
|
|
| MD5 |
2066a1c88743f0f98efa9d18a4b7ba86
|
|
| BLAKE2b-256 |
5624e6d4b05094258cd34af30c310551be4b9636c2d2f1639aefa1795674f676
|
File details
Details for the file stario-3.2.0-py3-none-any.whl.
File metadata
- Download URL: stario-3.2.0-py3-none-any.whl
- Upload date:
- Size: 166.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c389a20bcbd4197ceb48bbc4d098f7347d4a44efb57090b2b5ba13222635ee69
|
|
| MD5 |
b615f0112f3bf1b3f7329fdcc81188ff
|
|
| BLAKE2b-256 |
af3a180daee989a5c8d2012e7055bf414111c3fa8008fdc6ecac2150b8625298
|