Earlier quoted context omitted.
> Why can't be like pydantic Pydantic also has multiple styles, in fact, I think it has more styles than SQLAlchemy. > and use just one style for ORM? To be fair, one of the “styles” you show is not ORM, its the lower-level Core which can be used without the ORM and which the ORM is built on top of. And the two ORM styles include an older one largely for backward compatibility and a more modern one.
Then one really simple question: what to use ?
this is the quickstart:
https://docs.sqlalchemy.org/en/20/orm/quickstart.html
that's the one you use. That's it! There is no other style listed there
lots of people still want to use other styles or still have to because they have legacy code. So these are documented also. However, SQLAlchemy wants you to use the style at:
https://docs.sqlalchemy.org/en/20/orm/quickstart.html
that's the only style we would have if we were starting now.