-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Make datamodels DRY
Motivation
Right now the datamodels are not as DRY as they could be. Every _from_dict and _from_list manually unpacks the JSON response. Abstracting this would:
- Make adding new fields easier
- Reduce boilerplate and clutter
- Improve readability
Implementation
Haven’t fully thought through all the details yet, but the following could be replaced or generalized:
_from_dict_from_list- Automatic and/or manual mapping from snake_case → camelCase
The idea is to have a generic base class for datamodels that handles most of this automatically, while still allowing overrides for special cases.
Issues / Considerations
Potential edge cases or challenges:
- Error detection (e.g., type mismatches, unexpected API responses or missing fields)
- Nested dataclasses
- Lists of dataclasses
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request