python sqlalchemy query first