Design and implement declarative schema
Schemas are implemented as python classes in /pymemri/data/schema.py
. To define a new schema classes, pretty much all code is boilerplate. It would be better to generate schemas from a declarative definition (like json).
There are two parts to this issue:
-
We want plugin developers to easily create schemas, without having to write the python class. Plugin devs should define their schema as json (or python dict), and pymemri generates the relevant class.
-
We want to be able to read the JSON schemas from https://gitlab.memri.io/memri/schema .
Proposal: Make JSON format in schema repo the standard schema definition, and implement class factory that generates the python types. Needs example for plugin devs.