admin = User.query.filter_by(username='admin').first() admin.email = 'my_new_email@example.com' db.session.commit() user = User.query.get(5) user.name = 'New Name' db.session.commit()