Koyo
A Python web framework that puts the static output first. File based
routing, nested layouts, an HTML tag factory for components, Tailwind
for styling, and htmx for just enough interactivity. Then a build step
that prerenders your pages into plain HTML.
Quick start
pip install koyoapp # once published
koyoapp create my-app
cd my-app
koyoapp dev
# open http://127.0.0.1:2309
What Koyo gives you
File based routing
app/page.py maps to / out of the box. Add folders to build more routes; dynamic segments use bracket folders.
Nested layouts
A layout.py anywhere in the tree wraps every page below it, composed inside the root layout.
Components without JSX
koyoapp.html is a tag factory. Build reusable components in a components/ folder with Python functions.
Tailwind styling
globals.css compiles to koyo.css with your brand color, here the Koyo indigo #1800ad.
htmx interactivity
htmx 2.0 is vendored in. Pages can return fragments that swap into the DOM without a full reload.
Session state
use_state gives per-session in-memory values with increment and set actions.
Zero deps for runtime
Starlette, Uvicorn, watchfiles, typer, and tomlkit. That is the whole runtime footprint.
Production build
koyoapp build prerenders every static route to plain HTML with your assets and minified CSS.
Who this is for
Koyo is for developers who want to build a marketing site, a doc site,
or an internal tool with plain Python, ship plain HTML, and avoid both
a JavaScript framework on the server and a heavy frontend build chain.
State is deliberately simple and in memory, so Koyo is not the right
fit when you need a database, user accounts, or multi-process
sessions. See "State limitations"
and the FAQ.