My particular immediate use case would be to export the board outline and mounting holes from a kicad project (SVG or DXF, whatever works) and build a chassis for it. Obviously I can do this in freecad but I've been looking for an intuitive cad-as-code system to check into git instead. So this would be awesome!
While not code as CAD, Dune 3D has the creation of enclosures for electronics projects as its _raison d’être_, and has a facility for Python scripting:
Replicad is designed primarily to be used as a library with the web editor as a helper.
FluidCAD is designed to be used as full CAD package code + UI. I've outlined some of my motives in recent post: https://news.ycombinator.com/item?id=47721997
If I have a DXF or something of the outline of something (a PCB in this case) can I import it and build around it somehow?