class_docstr: Client of an MLflow Tracking Server that enabled the default basic authentication plugin.
  It is recommended to use :py:func:`mlflow.server.get_app_client()` to instantiate this class.
  See https://mlflow.org/docs/latest/auth.html for more information.
class_docstr_tok: ["Client","of","an","MLflow","Tracking","Server","that","enabled","the","default","basic","authentication","plugin",".","It","is","recommended","to","use",":","py",":","func",":","`","mlflow.server.get_app_client","(",")","`","to","instantiate","this","class",".","See","https",":","\/\/mlflow.org\/docs\/latest\/auth.html","for","more","information","."]
docstr: Create a new user.
  
  :param username: The username.
  :param password: The user's password. Must not be empty string.
  
  :return: A single :py:class:`mlflow.server.auth.entities.User` object.
           Raises ``RestException`` if the username is already taken.
  
  .. code-block:: python
      :caption: Example
  
      from mlflow.server.auth.client import AuthServiceClient
  
      client = AuthServiceClient("tracking_uri")
      user = client.create_user("newuser", "newpassword")
      print(f"user_id: {user.id}")
      print(f"username: {user.username}")
      print(f"password_hash: {user.password_hash}")
      print(f"is_admin: {user.is_admin}")
  
  .. code-block:: text
      :caption: Output
  
      user_id: 3
      username: newuser
      password_hash: REDACTED
      is_admin: False
docstr_tok: ["Create","a","new","user",".",":","param","username",":","The","username",".",":","param","password",":","The","user","'s","password",".","Must","not","be","empty","string",".",":","return",":","A","single",":","py",":","class",":","`","mlflow.server.auth.entities.User","`","object",".","Raises","``","RestException","``","if","the","username","is","already","taken",".","..","code-block",":",":","python",":","caption",":","Example","from","mlflow.server.auth.client","import","AuthServiceClient","client","=","AuthServiceClient","(","``","tracking_uri","''",")","user","=","client.create_user","(","``","newuser","''",",","``","newpassword","''",")","print","(","f","''","user_id",":","{","user.id","}","''",")","print","(","f","''","username",":","{","user.username","}","''",")","print","(","f","''","password_hash",":","{","user.password_hash","}","''",")","print","(","f","''","is_admin",":","{","user.is_admin","}","''",")","..","code-block",":",":","text",":","caption",":","Output","user_id",":","3","username",":","newuser","password_hash",":","REDACTED","is_admin",":","False"]
code: def create_user(self, username: str, password: str):
      """
      Create a new user.
  
      :param username: The username.
      :param password: The user's password. Must not be empty string.
  
      :return: A single :py:class:`mlflow.server.auth.entities.User` object.
               Raises ``RestException`` if the username is already taken.
  
      .. code-block:: python
          :caption: Example
  
          from mlflow.server.auth.client import AuthServiceClient
  
          client = AuthServiceClient("tracking_uri")
          user = client.create_user("newuser", "newpassword")
          print(f"user_id: {user.id}")
          print(f"username: {user.username}")
          print(f"password_hash: {user.password_hash}")
          print(f"is_admin: {user.is_admin}")
  
      .. code-block:: text
          :caption: Output
  
          user_id: 3
          username: newuser
          password_hash: REDACTED
          is_admin: False
      """
      resp = self._request(
          CREATE_USER,
          "POST",
          json={"username": username, "password": password},
      )
      return User.from_json(resp["user"])
  
imports: from mlflow.server.auth.entities import ExperimentPermission, RegisteredModelPermission, User
  from mlflow.server.auth.routes import CREATE_EXPERIMENT_PERMISSION, CREATE_REGISTERED_MODEL_PERMISSION, CREATE_USER, DELETE_EXPERIMENT_PERMISSION, DELETE_REGISTERED_MODEL_PERMISSION, DELETE_USER, GET_EXPERIMENT_PERMISSION, GET_REGISTERED_MODEL_PERMISSION, GET_USER, UPDATE_EXPERIMENT_PERMISSION, UPDATE_REGISTERED_MODEL_PERMISSION, UPDATE_USER_ADMIN, UPDATE_USER_PASSWORD
  from mlflow.tracking._tracking_service.utils import _get_default_host_creds
  from mlflow.utils.rest_utils import http_request_safe
label_desc: Use image node_id 3 for calling the AuthServiceClient obj's underlying member method code with example usage: obj.create_user(username, password) and returns: User