I want to query a junction table for the value of column aID that matches all values of a list of ids ids=[3,5] in column bID.
aID
ids=[3,5]
bID
Try:
session.query(JT.aID).filter(not_(JT.bID.in_(ids))).all()