SimpleSVG creates Inkscape-aware SVG documents with support for layers and groups.
Documentation is lacking, but the samples should help.
makesvg1.py creates an intricate document with complementary layers, grouping, clipping, and simple command-line argument parsing. By adjusting the visibility of the layers, various flavors of the result are obtained that are more appropriate for export to bitmap at a given resolution. Inkscape can be used in a command-line/batch mode to create these bitmaps.
makesvg2a.py and makesvg2b.py create the same very simple single-path document that is intended for uploading to Ponoko, using a Turtle-inspired drawing class.