Skip to content

Create proper data model to interact with DB #49

@gnthibault

Description

@gnthibault

Nice blog article about it:
https://towardsdatascience.com/how-to-make-the-most-of-pydantic-aa374d5c12d

Use of pydantic ecosystem:
https://docs.pydantic.dev/latest/usage/schema/
https://docs.pydantic.dev/latest/datamodel_code_generator/

Draw data model with:
https://erdantic.drivendata.org/v0.2/examples/pydantic/

In particular, we expect to use
from functools import singledispatch
with
@singledispatch
and
@process.register

Decorators, to save proper data object to the DB through SQLAlachemy,
see a nice demo here:
https://fastapi.tiangolo.com/tutorial/sql-databases/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions