使用Have()
from sqlalchemy import func session.query(Parent).\ join(Parent.children).\ group_by(Parent).\ having(func.count(Child.id) > 1)