prefect.server.utilities.user_templates

Utilities to support safely rendering user-supplied templates

Functions

register_user_template_filters

register_user_template_filters(filters: dict[str, Any]) -> None

Register additional filters that will be available to user templates

validate_user_template

validate_user_template(template: str) -> None

matching_types_in_templates

matching_types_in_templates(templates: list[str], types: set[str]) -> list[str]

maybe_template

maybe_template(possible: str) -> bool

render_user_template_sync

render_user_template_sync(template: str, context: dict[str, Any]) -> str

Classes

UserTemplateEnvironment

TemplateSecurityError

Raised when extended validation of a template fails.