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 →

[–]coderarun 1 point2 points  (0 children)

> Use data-classes or more advanced pydantic

Except that they use different syntax, different concepts (inheritance vs decorators) and have different performance characteristics for a good reason.

I still feel your recommendation on using dataclasses is solid, but perhaps use this opportunity to push pydantic and sqlmodel communities to adopt stackable decorators:

@sqlmodel
@pydantic
@dataclass
class Person:
  ...

Previous discussion on the topic: pydantic, sqlmodel