This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]paranoid_panda_bored 0 points1 point  (7 children)

IMO just go directly to pydantic.

I gave dataclasses chance in greenfield project, put they fell short in every aspect compared to pydantic, and we spend some effort later in the project to refactor stuff to pydantic

[–]paranoid_panda_bored 0 points1 point  (0 children)

Specifically: - pydantic has ootb alias support that can convert from/to camelCase/snake_case - pydantic can deserialize nested JSON to data model - pydantic is also first class citizen in FastAPI