MCPcopy Create free account
hub / github.com/assemblerflow/flowcraft / render

Method render

flowcraft/generator/process.py:402–417  ·  view source on GitHub ↗

Wrapper to the jinja2 render method from a template file Parameters ---------- template : str Path to template file. context : dict Dictionary with kwargs context to populate the template

(template, context)

Source from the content-addressed store, hash-verified

400
401 @staticmethod
402 def render(template, context):
403 """Wrapper to the jinja2 render method from a template file
404
405 Parameters
406 ----------
407 template : str
408 Path to template file.
409 context : dict
410 Dictionary with kwargs context to populate the template
411 """
412
413 path, filename = os.path.split(template)
414
415 return jinja2.Environment(
416 loader=jinja2.FileSystemLoader(path or './')
417 ).get_template(filename).render(context)
418
419 @property
420 def template_str(self):

Callers 2

template_strMethod · 0.95
_render_configMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected