Open felnne opened 3 years ago
I think the approach outlined in the Hypermodern Python guide would work well for this.
This issue supersedes #25, which stated:
Too complex a structure to do with normal type hints, however https://pydantic-docs.helpmanual.io includes a method to generate a model from a JSON schema which we could use for this.
I.e. we would write a JSON Schema that describes the export format (which would be useful anyway so there's an official reference for it) and use that to generate a Pydantic model, which the prepare_export method would implement.
I.e. using a JSON Schema people can refer to if writing an exporter.
Relates to #25.