I installed the svgwrite package, and ran the example code at the very first of the README
dwg = svgwrite.Drawing('test.svg', profile='tiny')
dwg.add(dwg.line((0, 0), (10, 0), stroke=svgwrite.rgb(10, 10, 16, '%')))
dwg.add(dwg.text('Test', insert=(0, 0.2), fill='red'))
dwg.save()
However when I generate the image, I don't see anything in my SVG preview.

What am I missing?
By default the generated XML is not pretty-printed. It looks like it's just flowing off-screen in your preview.