I've been experimenting with this recently as an alternative to Visio,
matplotlib, etc. Haven't gotten around to any art yet, but it'll get there.
There are libraries to make this "easier" of course, but IME they don't. With
just a tiny bit of help, XML is easy to write directly.
https://shayallenhill.com/2019/10/09/svg-with-css-in-python/
-Shay