jinja2_eval package

class jinja2_eval.EvalExtension(environment: Environment)[source]

Bases: Extension

Jinja2 extension to evaluate expressions and statements.

identifier: ClassVar[str] = 'jinja2_eval._main.EvalExtension'
parse(parser: Parser) Output[source]

If any of the tags matched this method is called with the parser as first argument. The token the parser stream is pointing at is the name token that matched. This method has to return one or a list of multiple nodes.

tags: Set[str] = {'eval'}

A set of names that trigger the extension.