Functions
create_environment
3
Environment
▼
Create a kida Environment from app configuration.
Called once during ``App._fr…
create_environment
3
Environment
▼
def create_environment(config: AppConfig, filters: dict[str, Callable[..., Any]], globals_: dict[str, Any]) -> Environment
Create a kida Environment from app configuration.
Called once duringApp._freeze(). The returned environment
is immutable for the lifetime of the app.
Parameters
| Name | Type | Description |
|---|---|---|
config |
AppConfig |
|
filters |
dict[str, Callable[..., Any]] |
|
globals_ |
dict[str, Any] |
Returns
Environment
render_template
2
str
▼
Render a full template to string.
render_template
2
str
▼
def render_template(env: Environment, tpl: Template) -> str
Parameters
| Name | Type | Description |
|---|---|---|
env |
Environment |
|
tpl |
Template |
Returns
str
render_fragment
2
str
▼
Render a named block from a template to string.
render_fragment
2
str
▼
def render_fragment(env: Environment, frag: Fragment) -> str
Parameters
| Name | Type | Description |
|---|---|---|
env |
Environment |
|
frag |
Fragment |
Returns
str