Module

templating.kida_adapter

Kida-backed implementation of TemplateAdapter.

Classes

KidaAdapter 5
TemplateAdapter implementation using Kida's public block/layout APIs.

TemplateAdapter implementation using Kida's public block/layout APIs.

Methods

render_template 2 str
Render a full template to HTML.
def render_template(self, template: str, context: dict[str, Any]) -> str
Parameters
Name Type Description
template
context
Returns
str
render_block 3 str
Render a named block from a template.
def render_block(self, template: str, block: str, context: dict[str, Any]) -> str
Parameters
Name Type Description
template
block
context
Returns
str
compose_layout 3 str
Render template with pre-rendered HTML injected into blocks.
def compose_layout(self, template: str, block_overrides: dict[str, str], context: dict[str, Any]) -> str
Parameters
Name Type Description
template
block_overrides
context
Returns
str
template_metadata 1 object | None
Return TemplateMetadata for block validation and composition planning.
def template_metadata(self, template: str) -> object | None
Parameters
Name Type Description
template
Returns
object | None
Internal Methods 1
__init__ 1
def __init__(self, env: Environment) -> None
Parameters
Name Type Description
env