module texthelper.templating

Inheritance diagram of pyquickhelper.texthelper.templating

Short summary

module pyquickhelper.texthelper.templating

Templating functions

source on GitHub

Classes

class

truncated documentation

CustomTemplateException

Raised when a templatre could not compile.

Functions

function

truncated documentation

apply_template

Extend a string containing templating instructions. See mako or jinja2.

Documentation

Templating functions

source on GitHub

exception pyquickhelper.texthelper.templating.CustomTemplateException[source][source]

Bases: Exception

Raised when a templatre could not compile.

source on GitHub

pyquickhelper.texthelper.templating.apply_template(text, context, engine='mako')[source][source]

Extend a string containing templating instructions. See mako or jinja2.

Parameters
  • text – text

  • context – local variable to use

  • engine – ‘mako’ or ‘jinja2’

Returns

resulting text

source on GitHub