def deleteUser(): """ Delete a user from the database. :param email: the email of the user :type email: str :return: "User Successfully Removed", status code :rtype: str, int :raises KeyError: if the input is not provided by the user :raises sqlalchemy.orm.exc.NoResultFound: if the user is not found in the database """ data = request.data dataDict = loads(data) try: userEmail = dataDict['email'] except KeyError: error = "Invalid input Parameters" return error, 400 try: User.deleteUser(userEmail) except NoResultFound: error = "User Not found" return error, 404 return "User Successfully Removed"