Taken from http://mydxf.blogspot.com/2008/11/inkscape-r12-dxf.html and fixed to work with the latest inkscape (0.92.1)
Minimal inkscape 1.0 extension https://github.com/costycnc/inkscape-1.0-python-hello-world-extension-costycnc
This extension is util for who want to learn the base principle of python language and in special for who want create for first time or want to understand how request all paths or nodes for ulterior custom programming.