Pycairo is a Python vector graphics library. You can use it to draw basic lines and shapes such as rectangles, circles, bezier curves and so on, and combine them to create more complex drawings, charts and diagrams. It also supports more advanced options such as pattern fills, transparency and clipping. It can output images in bitmap format (PNG) or vector format (SVG).
This Pycairo tutorial includes: