def expand(template_str, dictionary, **kwargs):
  t = Template(template_str, **kwargs)
  return t.expand(dictionary)
Free function to expands a template string with a data dictionary.
dataset/ETHPy150Open cloudbuilders/radioedit/jsontemplate.py/expand