trompamusic / trompace-client

A python library to read from and write to the Trompa CE
Apache License 2.0
1 stars 0 forks source link

Try and encapsulate data for an object better #54

Open alastair opened 3 years ago

alastair commented 3 years ago

Currently we create objects by passing data in as parameters. We don't have many methods that retrieve data, but the ones that do return this data as dictionaries. We should improve the way that we store this data. Either with dataclasses, or pydantic. This will require that we parse sub objects in a way that allows us to create relationships where needed in graphql (e.g. a work's composer), and to parse these results from a query back into an object. Ideally this would be the role of a graphql python library - we should double-check if there are any new libraries that can help us with this.