jinja2_interface#

confs.jinja2_interface.write_from_template(tmpl_path, output_file, in_dict, fail_missing=False, rpl_tmpl_mrks=False, f90_bool=False, skip_missing=False)[source]#

DESCRIPTION:

This function writes a Jinja2-formatted file established from a templated Jinja2-formatted file.

Parameters:
tmpl_path: str

A Python string defining the path to the Jinja2-formatted template file.

output_file: str

A Python string containing the full-path to the Jinja2-formatted file to be written.

in_dict: Dict

A Python dictionary containing the template variable key and value pairs.

Raises:
Jinja2InterfaceError:
  • raised if an exception is encountered while writing the Jinja2-formatted file.

Return type:

None

confs.jinja2_interface.write_jinja2(jinja2_file, in_dict)[source]#

DESCRIPTION:

This function writes a Jinja2-formatted file using the specified Python dictionary.

Parameters:
jinja2_file: str

A Python string containing the full-path to the Jinja2-formatted file to be written.

in_dict: Dict

A Python dictionary containing the attributes to be written to the Jinja2 file.

Raises:
Jinja2InterfaceError:
  • raised if an exception is encountered while writing the Jinja2-formatted file.

Return type:

None