commands.reset_password

module commands.reset_password

Global Variables

  • API_HOST


function prompt_for_input

prompt_for_input(
    prompt_message: str,
    type: Optional[type] = <class 'str'>,
    hide_input: bool = False
)str

Prompt the user for input.

Args:

  • prompt_message (str): The message to display when prompting the user.

  • type (type, optional): The type of input to expect. Defaults to str.

  • hide_input (bool, optional): Whether to hide the input (for passwords). Defaults to False.

Returns:

  • str: The user's input.


function handle_http_error

handle_http_error(
    e: HTTPError,
    error_msg: str,
    debug: Optional[bool] = DEBUG_OPTION
)None

Handle an HTTP error.

Args:

  • e (HTTPError): The error to handle.

  • debug (Optional[bool]): Whether to raise the error for debugging. Defaults to DEBUG_OPTION.


function request_reset_password_token

request_reset_password_token(
    email: str = typer.Option(None, "--email"),
    debug: Optional[bool] = DEBUG_OPTION
)bool

Request a password reset token for a given email.

Args:

  • email (str): The email to request a password reset for.

  • debug (Optional[bool]): Whether to raise errors for debugging. Defaults to DEBUG_OPTION.

Returns:

  • bool: True if the request was successful, False if not.


function reset_password

reset_password(
    token: str = typer.Option(None, "--token"),
    debug: Optional[bool] = DEBUG_OPTION
)bool

Reset the password for a user using a reset token.

Args:

  • token (str): The reset token received by email.

  • debug (Optional[bool]): Whether to raise errors for debugging. Defaults to DEBUG_OPTION.

Returns:

  • bool: True if the reset was successful, False if not.

Last updated