tapis_cli.templating package

Supports Jinja-based templating across the CLI

tapis_cli.templating.key_values(passed_vals=None)

Create a dict that can be used to render a Jinja template

tapis_cli.templating.render_template(doc_source, passed_vals=None, allow_undefined=True)

Render a string template using extant variables

Parameters:

doc_source (str) – Template string

Keyword Arguments:
 
  • passed_vals (dict, optional) – Dictionary of variable name/value pairs
  • file (str|list, optional) – One or more files containing variable data
  • allow_undefined (bool, optional) – Do not raise an Exception when there are un-rendered variables
Returns:

Rendered string

Return type:

str

tapis_cli.templating.dot_notation(sourcedict, replacelevel=None)

Transform a nested configparser option into section.option form

Submodules

tapis_cli.templating.settings module

Imports Tapis CLI settings to a Jinja environment

Prefixes TAPIS_PY and TAPIS_CLI are stripped and key names are lowercased.

tapis_cli.templating.settings.key_values()