blob: b2d99ce4df7989b34f30e451bb84d8a1c1fa02a9 [file] [log] [blame]
DR695H5fa01462017-02-15 18:21:12 -05001from string import Template
2
3class StringTemplater:
4 """StringTemplater is common resource for templating with strings."""
DR695Ha8ba9512018-02-23 17:26:37 -05005
DR695H5fa01462017-02-15 18:21:12 -05006 def template_string(self, template, values):
7 """Template String takes in a string and its values and converts it using the string.Template class"""
DR695Ha8ba9512018-02-23 17:26:37 -05008 return Template(template).substitute(values)