Loads templates from loaders until first succeed.
Loads templates from python dictionary.
templates - a dict where key corresponds to template name and value to template content.
Loads templates from file system.
directories - search path of directories to scan for template. encoding - decode template content per encoding.
Tranlates function calls between template engines.
Strictly determined known calls are converted to preprocessor calls, e.g.:
@_('Name:')
@path_for('default')
@path_for('static', path='/static/css/site.css')
Those that are not strictly determined are ignored and processed by runtime engine.
Checks if expresion is strictly determined.
>>> determined("'default'")
True
>>> determined('name')
False
>>> determined("'default', id=id")
False
>>> determined("'default', lang=100")
True
>>> determined('')
True
Parses argument type of parameters.
>>> parse_args('')
[]
>>> parse_args('10, "x"')
['10', '"x"']
>>> parse_args("'x', 100")
["'x'", '100']
>>> parse_args('"default"')
['"default"']
Parses key-value type of parameters.
>>> parse_kwargs('id=item.id')
{'id': 'item.id'}
>>> sorted(parse_kwargs('lang="en", id=12').items())
[('id', '12'), ('lang', '"en"')]