Open pahjbo opened 2 years ago
some work on python generation has been started on the pythongen branch
this work has been merged back into the master branch as the initial task integration has been completed and does not conflict with any other development on master.
The python generation task is called vodmlPythonGenerate
and the main functionality of the generation is done in the
vo-dml2python.xsl XSLT.
The python generation is only a first attempt at generating dataclasses with no serialisation functionality, and as such is not yet advertised in the main documentation
https://docs.pydantic.dev/latest/ is another candidate library to use for the python implementation
an "alpha" level of python generation that is using xsdata and sqlAlchemy has been released in version 0.3.24 of the plugin - this is not interoperable with the Java version, and so the detailed representation is likely to be changed before this is regarded as "finished"
It would be good to have python code generation (to python dataclasses?) similarly to the java code generation. Care would have to be taken to match the XML and ORM capabilities to interoperate with the java equivalents.
Some inspiration could be taken from https://xsdata.readthedocs.io/en/v22.2/index.html for XML and https://www.sqlalchemy.org for ORM