get a list of id from table sql alchamy code example Example: sqlalchemy get ids session.query(Thing.id).all()