pip install imagestack-svg
xvfb-run python3 {your application}
You can test your SVG Design here: https://skillor.github.io/imagestack-svg-python/
from imagestack_svg.imagecreator import ImageCreator
from imagestack_svg.imageresolve import ImageStackResolveString
ig = ImageCreator()
s = ImageStackResolveString('<text>{{ dummy }}</text>')
s(dummy='Hello World!')
print(await ig.create_inner_svg(s))
with open('test.png', 'wb') as f:
f.write((await ig.create_bytes(s)).read())
more examples here: https://github.com/skillor/imagestack-svg-python/blob/master/test.py