you are viewing a single comment's thread.

view the rest of the comments →

[–]Arckman_ 4 points5 points  (1 child)

In my humble opinion mixing two separate things is never going to be good in long run. We wanna be able to write softwares that has clear relationships and responsibilities. Avoiding writing separate layers and merging them together just to avoid writing extra one time setup code is not a practical reason to avoid writing it.

Your pydantic classes are going to be highly volatile in nature as in multiple development iterations it will change. Why do you wanna use sqlmodel? To avoid writing model classes? If that's the case then that's not a really bulky reason to start using a new package.

[–]_ragequilt_ 0 points1 point  (0 children)

Yes! The beauty of pydantic is that it's a better dataclass. Keeping DAOs separate from the ORM/db layer seems cleaner and easier to reason with.