DR695H | 5fa0146 | 2017-02-15 18:21:12 -0500 | [diff] [blame] | 1 | from string import Template |
| 2 | |
| 3 | class StringTemplater: |
| 4 | """StringTemplater is common resource for templating with strings.""" |
DR695H | a8ba951 | 2018-02-23 17:26:37 -0500 | [diff] [blame] | 5 | |
DR695H | 5fa0146 | 2017-02-15 18:21:12 -0500 | [diff] [blame] | 6 | def template_string(self, template, values): |
| 7 | """Template String takes in a string and its values and converts it using the string.Template class""" |
DR695H | a8ba951 | 2018-02-23 17:26:37 -0500 | [diff] [blame] | 8 | return Template(template).substitute(values) |