jinja2.lexer.Lexer.tokeniter

Lexer.tokeniter(source, name, filename=None, state=None)[source]

This method tokenizes the text and returns the tokens in a generator. Use this method if you just want to tokenize a template.