title: Replace each instance of jinja variable with string in Python
body: <p>I have the following code to create a string using Jinja</p>
  <pre><code>from jinja2 import Template
  
  jT = Template('&quot;text&quot;: {{text}}, &quot;peripherals&quot;: {{peripherals}}')
  params = {'text': 'some_text', 'peripherals': 'mouse'}
  jT.render(**params)
  </code></pre>
  <p>The resulting output is:</p>
  <p><code>'&quot;text&quot;: some_text, &quot;peripherals&quot;: mouse'</code></p>
  <p>Is there a way to surround the substituted values inside quotes, like so:</p>
  <p><code>'&quot;text&quot;: &quot;hello&quot;, &quot;peripherals&quot;: &quot;mouse&quot;'</code></p>
  <p>Besides editing the existing jinja and using {{text|tojson}}, is there a way/function in Python to automatically wrap every substituted value inside quotes?</p>