jLM.Template#

Templating engine tools

Functions

displayj2html(fname, ctx)

Renders an HTML template and displays in Jupyter notebook

j2render(fname, ctx)

Renders a template given a context dictionary

jLM.Template.displayj2html(fname, ctx)[source]#

Renders an HTML template and displays in Jupyter notebook

Parameters:
  • fname (str) – template file in the “templates” directory

  • ctx (dict) – context dictionary

jLM.Template.j2render(fname, ctx)[source]#

Renders a template given a context dictionary

Parameters:
  • fname (str) – template file in the “templates” directory

  • ctx (dict) – context dictionary

Returns:

Rendered template

Return type:

str