Converting Geometry and Data to SHP Files using python

Hello folks. I’ve been trying to make a script through which I could convert geometry and string data into a shape file for gis visualization. I’m not too keen on coding, but I’ve made a few attempts using python, with no luck whatsoever, there’s always something not going right, here’s a screenshot of it.


I’ve internalized just two polygons and their metadata to test the script until I could get it right and then work with the full version of my info

GH file attached if anyone could help with this

ghpython to shp.gh (15.0 KB)

To pass 3D points to PyShp not 2D ones, I think you need POLYLINEZ and POLYGONZ etc.