title: Reportlab's Code128 Barcode as HTML Image Tag with Data URI Scheme in Python
body: <p>I need to create an Code128 Barcodes with Python/Django which have to be embeded in HTML document. </p>
  
  <p>I don't want to make any temporary (or cache) files on the disk. That's why I want to embed them as Data URI Scheme. </p>
  
  <p>The result have to be something like this: </p>
  
  <pre><code>&lt;img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
  AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
  9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot"&gt;
  </code></pre>
  
  <p>Can you recommend me an easy way to do this?</p>
  
  <p>Now I use ReportLab to create such a barcodes and embed them in PDF files, but I don't know how to export them as Data URI Scheme. If this is the recommended way to do this.</p>