title: Adding a variable string to an expression in Airium (Python)
body: <p>I'm working on a little jig that generates a static gallery page based on a folder full of images. My current hangup is generating the HTML itself-</p>
  <p>I used <a href="https://pypi.org/project/airium/" rel="nofollow noreferrer">Airium</a> to reverse-translate my existing HTML to Airium's python code, and added the variables I want to modify for each anchor tag in a loop. But I can't for the life of me figure out how to get it to let me add 'thumblink'. I'm not sure why it's treating it so differently from the others, my guess is that Airium expects <em>foo:bar</em> but not <em>foo:bar(xyz)</em> with xyz being the only part I want to pull out and modify.</p>
  <pre><code>from airium import Airium
  imagelink = &quot;image name here&quot; # after pulling image filename from list
  thumblink = &quot;thumb link here&quot; # after resizing image to thumb size
  artistname = &quot;artist name here&quot; # after extracting artist name from filename
  a = Airium()
  
  with a.a(href='javascript:void(0);', **{'data-image': imagelink}):
      with a.div(klass='imagebox',  style='background-image:url(images/2015-12-29kippy.png)'):
          a.div(klass='artistname', _t= artistname)
  html = str(a)  # cast to string
  print(html) # print to console 
  </code></pre>
  <p>where &quot;<em>images/2015-12-29kippy.png</em>&quot; is what I'd replace with string variable &quot;<em>thumblink</em>&quot;.</p>
  <p>image and artist do translate correctly in the output after testing -</p>
  <pre><code>&lt;a href=&quot;javascript:void(0);&quot; data-image=&quot;image name here&quot;&gt;
    &lt;div class=&quot;imagebox&quot; style=&quot;background-image:url(images/2015-12-29kippy.png)&quot;&gt;
      &lt;div class=&quot;artistname&quot;&gt;artist name here&lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &gt;&gt;&gt;
  </code></pre>