I have the following query:
profiles = session.query(profile.name).filter(and_(profile.email == email, profile.password == password_hash))
Assuming you have a model User, you can get the first result with:
User.query.first()
If the table is empty, it will return None.