Allows to create a user using the CLI. The username must be unique and the email account should not have been used previously for another user.
> giza users createEnter your username π: gizabrainEnter your password π₯· : (this is a secret)Enter your email π§: gizabrain@gizatech.xyz[giza][2023-06-23 12:29:41.417] User created β . Check for a verification email π§
This will create an inactive user in Giza, to activate it you need to verify your user through the verification email.
If there is an error or you want to have more information about what it's going on there is a --debug flag that will add more information about the error. This will print outgoing requests to the API, debug logs and python traceback about what happened.
β οΈNote: be aware that the debug option will print everything that its going to the API, in this case the password will be printed as plain text in the terminal, if you are using the debug option to fill an issue make sure to remove the credentials.
Login a user
Log into Giza platfrom and retrieve a JWT for authentication. This JWT will be stored to authenticate you later until the token expires.
You need te have an active account to log in
> giza users loginEnter your username π: gizabrainEnter your password π₯· :[giza][2023-06-23 12:32:17.917] Log into Giza[giza][2023-06-23 12:32:18.716] βοΈCould not authorize the userβοΈ[giza][2023-06-23 12:32:18.718] βοΈStatus code -> 400βοΈ[giza][2023-06-23 12:32:18.719] βοΈError message -> {'detail': 'Inactive user'}βοΈ
Once activated you can successfully log into Giza:
> giza users loginEnter your username π: gizabrainEnter your password π₯· :[giza][2023-07-12 10:52:25.199] Log into Giza[giza][2023-07-12 10:52:46.998] Credentials written to: /Users/gizabrain/.giza/.credentials.json[giza][2023-07-12 10:52:47.000] Successfully logged into Giza β
If you want force the renewal of the token you can use --renew to force the log in. If the flag is not present we verify if there has been a previous log in and check that the token it's still valid.
> giza users loginEnter your username π: gizabrainEnter your password π₯· :[giza][2023-07-12 10:55:26.219] Log into Giza[giza][2023-07-12 10:55:26.224] Token it still valid, re-using it from ~/.giza[giza][2023-07-12 10:55:26.224] Successfully logged into Giza β
With --renew:
> giza users login --renewEnter your username π: gizabrainEnter your password π₯· :[giza][2023-07-12 10:56:44.316] Log into Giza[giza][2023-07-12 10:56:44.979] Credentials written to: /Users/gizabrain/.giza/.credentials.json[giza][2023-07-12 10:56:44.980] Successfully logged into Giza β
Note: --debug its also available.
Create API key
Create an API key for the current user. This API key will be stored and will be used to authenticate the user in the future.
You need te have an active account to log in
> giza users create-api-key[giza][2024-01-17 15:27:27.936] Creating API Key β [giza][2024-01-17 15:27:53.605] API Key written to: /Users/gizabrain/.giza/.api_key.json[giza][2024-01-17 15:27:53.606] Successfully created API Key. It will be used for future requests β
Now you can use the API key to authenticate yourself withouth the need of login again and again.
NOTE: The usage of API key is less secure than JWT, so use it with caution.
Retrieve my user info
Retrieve information about the current user.
You need te have an active account
> giza users me[giza][2023-07-12 10:59:43.821] Retrieving information about me![giza][2023-07-12 10:59:43.823] Token it still valid, re-using it from ~/.giza{ "username": "gizabrain", "email": "gizabrain@gizatech.xyz", "is_active": true}