mnesis.operators.template_utils¶
template_utils
¶
Shared Jinja2 template utilities for operator modules.
require_item_variable
¶
Raise ValueError if the Jinja2 template does not reference the item variable.
Uses Jinja2 AST parsing instead of regex for correctness with complex expressions
like {{ item['key'] }} and {{ item | upper }}. Invalid template syntax
is also reported as ValueError.