Assuming you use the declarative style (i.e. ORM classes), it is pretty easy:
query = db_session.query(User.id, User.name).filter(User.id.in_([123,456]))
results = query.all()
db_session
is your database session here, while User
is the ORM class with __tablename__
equal to "users"
.