Kida

Server-side components for Python with typed props, named slots, and static validation — no npm or build step

Server-Side Components for Python

Typed props. Named slots. Static validation. No npm. No build step.

Kida gives server-rendered Python apps a real component model. Define components with typed props, compose them with named slots, and catch broken calls before a request reaches production. The rendering substrate is pure Python 3.14+ with no runtime dependencies or JavaScript toolchain.

{% def card(title: str, variant: str = "default") %}
<article class="card card--{{ variant }}">
  <header>{{ title }}</header>
  <div class="card__body">{% slot %}</div>
</article>
{% enddef %}

{% call card("Settings", variant="elevated") %}
  <p>Configure your preferences.</p>
{% endcall %}

A Component Model, Not a Macro Convention

Typed Props

Declaretitle: strand defaults where the component is defined. Kida validates literal call sites before render.

Named and Scoped Slots

Compose headers, bodies, actions, and data-bearing child content without reducing everything to onecaller()blob.

Free-Threading Ready

Built for Python 3.14t (PEP 703), with immutable compiled templates,ContextVar render state, and copy-on-write environment mutation.

Pure Python

No npm, build step, or runtime dependencies. Use Kida from Flask, Django, FastAPI/Starlette, Chirp, Bengal, scripts, and CI.

Catch Broken Calls Before Render

{% def badge(count: int, label: str) %}
<span class="badge">{{ count }} {{ label }}</span>
{% enddef %}

{{ badge(count="five", lable="Messages") }}
K-CMP-001: Call to 'badge' — unknown params: lable; missing required: label
K-CMP-002: param 'count' expects int, got str ('five')

Use Kida Where You Are

  • Add typed components to an existing Flask, Django, FastAPI, or Starlette app.
  • Render full pages, HTMX fragments, streamed responses, or static sites.
  • Reuse the same component semantics for HTML, Markdown, terminal output, and CI reports.
  • Give frameworks structured component metadata instead of asking them to inspect AST internals.

Build typed components or compare Kida components with Jinja2 macros.


Zero Dependencies

Kida is pure Python with no runtime dependencies:

[project]
dependencies = []  # Zero!

Includes a native Markupclass for safe HTML handling—no markupsafe required.


Python Components Ecosystem

Kida is the component layer in a broader pure-Python stack for 3.14t free-threading. Bengal remains a legacy integration rather than the identity of the stack.

ᓚᘏᗢ Bengal Legacy static-site integration Docs
∿∿ Purr Content runtime
⌁⌁ Chirp Web framework Docs
=^..^= Pounce ASGI server Docs
)彡 Kida Server-side component system ← You are here Docs
ฅᨐฅ Patitas Markdown parser Docs
⌾⌾⌾ Rosettes Syntax highlighter Docs

Python-native. Free-threading ready. No npm required.