Now there are two new scripts for you to try in CODESYS.
They are both a example and not fully integrated, but maybe it will help you to start scripting with CODESYS and PYTHON.
CodesysProgramGeneration/README.md at main · MichaelDrostWago/CodesysProgramGeneration
GetDocumentation
This exports all of your librarys and POUs, to document your actual state of the project. The File is then located in the projectfolder.
It is example and not all functions are integrated.
ExportXML and testXmlHandling
With ExportXml.py you can export your whole project to an XML-file. Then you can iterate trough this with testXmlHandling.py. You can also merge the two projects to get you information directly from your project. The Handling of the XML-file is much easier then the handling with the Built-In Codesys functions.