shapely package for Python how to export the resulting shapely objects such as
buffer to a
Shapely doesn't directly support exporting to DXF - it supports export to Well Known Text (WKT), Well Known Binary (WKB), Numpy arrays and GeoJSON objects (interoperation from the Shapely manual). As such you need a package that can transform from one of these formats to DXF.
Then simply use the ogr2ogr utility to transform the GeoJSON to a DXF file, e.g.
Then, if you're keen you can look up the GDAL/OGR Python bindings and do it within a single script. Hope this helps!
It coughs up a lot of warnings about mismatch between GIS simple feature and DXF data models but does write a file of entities.