commands.users
module commands.users
commands.users
Global Variables
API_HOST
function create
create
Command to create a user. Asks for the new users information and validates the input, then sends the information to the API
Args:
debug
(Optional[bool], optional): Whether to add debug information, will show requests, extra logs and traceback if there is an Exception. Defaults to DEBUG_OPTION (False).
Raises:
ValidationError
: input fields are validated, if these are not suitable the exception is raisedHTTPError
: request error to the API, 4XX or 5XX
function login
login
Logs the current user into Giza. Under the hood this will retrieve the token for the next requests. This token will be saved at home
directory for further usage.
Args:
renew
(bool): Force the retrieval of the token to create a new one. Defaults to False.debug
(Optional[bool]): Whether to add debug information, will show requests, extra logs and traceback if there is an Exception. Defaults to DEBUG_OPTION (False)
Raises:
HTTPError
: request error to the API, 4XX or 5XX
function create_api_key
create_api_key
Create an API key for your user. You need to be logged in to create an API key. The API Key will be saved at home
directory for further usage.
Args:
debug
(Optional[bool]): Whether to add debug information, will show requests, extra logs and traceback if there is an Exception. Defaults to DEBUG_OPTION (False)renew
(bool): Force the retrieval of the token to create a new one. Defaults to False.
Raises:
HTTPError
: request error to the API, 4XX or 5XX
function me
me
Retrieve information about the current user and print it as json to stdout.
Args:
debug
(Optional[bool], optional): Whether to add debug information, will show requests, extra logs and traceback if there is an Exception. Defaults to DEBUG_OPTION (False)
function resend_email
resend_email
Command to resend verification email. Asks for the user's email and sends the request to the API
Args:
debug
(Optional[bool], optional): Whether to add debug information, will show requests, extra logs and traceback if there is an Exception. Defaults to DEBUG_OPTION (False).
Raises:
ValidationError
: input fields are validated, if these are not suitable the exception is raisedHTTPError
: request error to the API, 4XX or 5XX
Last updated