I would like to retrieve only key pairs stored in the association table in SQLAlchemy. One way is to create an association class and do something like session.query(Assoc).all() .
session.query(Assoc).all()
Can you query the mapping table in a similar way?
Tables can be queried in the same way as declarative models. The request returns a list of keys, not instances of the class.
session.query(my_table).all()