def get_by_username(username): if User.get_user(username): return Response(str(User.get_user(username)), 200, mimetype="application/json") else: return Response(error_message_helper("User not found"), 404, mimetype="application/json")
def get_by_username(username): """Gets a user by username""" response = Response(str(User.get_user(username)), 200, mimetype="application/json") return response