Skip to main content

Stario - Bringing back the joy of web development

Project description

Stario

Stario
Craft realtime hypermedia apps that are a joy to write and ship.

Documentation · Source


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: Context for the request, Writer for the response, HTML via stario.html, telemetry via span.
  • 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

stario-3.0.0.tar.gz (140.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

stario-3.0.0-py3-none-any.whl (164.4 kB view details)

Uploaded Python 3

stario-3.0.0-cp314-cp314-macosx_11_0_arm64.whl (341.8 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

File details

Details for the file stario-3.0.0.tar.gz.

File metadata

  • Download URL: stario-3.0.0.tar.gz
  • Upload date:
  • Size: 140.1 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

Hashes for stario-3.0.0.tar.gz
Algorithm Hash digest
SHA256 1eaea640331d603ee3bace5574c15433d3a9a065b47bbd62a5b66cc8ab236d6f
MD5 37e70e34f5fa5c94ee5a4e62fa1aef51
BLAKE2b-256 de29104ceb5e4af3984f80d32ad1bacc232f5625bcc28d9bd0187f219ab9a8e6

See more details on using hashes here.

File details

Details for the file stario-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: stario-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 164.4 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

Hashes for stario-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 070e72bd30d92b7dcaca4d748f66e6629a5576877a5c42dc43201cc8c4e778cc
MD5 dc482bfb6321449fa92cbb82e65977ab
BLAKE2b-256 8aac9f98ec45d7ad38a7831f400e0ad20e9ec01cae875ae476b885c3692c0a9c

See more details on using hashes here.

File details

Details for the file stario-3.0.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

  • Download URL: stario-3.0.0-cp314-cp314-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 341.8 kB
  • Tags: CPython 3.14, macOS 11.0+ ARM64
  • 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

Hashes for stario-3.0.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 96f46789f4bb0efc816e2365fd9848eeb7258f895e718afcdcdaa757199753df
MD5 b3aad8429f695350173b593adbc668fe
BLAKE2b-256 e9183c3d0dfca8d4eabc30e0a4650a35d0c3e32fcfd303941ec7c3a5b8a8e2c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page