Kida

Pure-Python server-side components with typed props, named slots, and static validation

Server-Side Components for Python

Typed. Composable. Checked before render.

Kida gives Python applications a real component model. Define components with typed props, compose them with named and scoped slots, and catch broken calls before a request reaches production. The same pure-Python engine renders HTML, Markdown, terminal output, and CI reports—with no npm, no build step, and no runtime dependencies.

Kida, a cross-eyed snow-lynx Bengal cat, actively assembling jungle components that become web, terminal, Markdown, and CI output

{% 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')

One System, Many Surfaces

  • 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 personal, pure-Python stack built for Python 3.14t. Each project stands on its own; together they cover the path from content and components to applications, servers, sites, terminals, and developer tools.

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

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