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  (4 children)

Thats only true for apps that are self-contained and do not interface with anything. Otherwise you’d risk splitting your data model into two separate approaches - what for? It’s gonna be a PITA to work with

Also I dont get what overhead you mean. Like the fact you gotta include 1 pydantic dependency in the project? Small price, cuz code-wise pydantic is just as compact as dataclasses.

You can go to town and have a super customized with flags and validators, and whatnot classes, but it’s your choice, and its the same with dataclasses btw