How to automatically reflect database to sqlalchemy declarative?
sqlautocode - has issues with many-to-many relations sqlsoup - doesn't support relations elixir - it's note auto-generate Is there something else I could try? In theory reflection in sqlalchemy should work for you. In this case I'm using an mssql database with two tables which have a simple Many-to-one relation: "Tests" with fields: id testname author_id (foreign key to the Users table, Users.id field) "Users" with fields: id fullname So the following should reflect the database: from sqlalchemy import * from sqlalchemy.orm import create_session from sqlalchemy.ext.declarative import