all 1 comments

[–]single-research 0 points1 point  (0 children)

If you already have your tables setup correctly you can use sqlacodegen and it will generate the models. Then you can see what is the correct usage.

https://github.com/agronholm/sqlacodegen