afnio.tellurio.cli
afnio.tellurio.cli.afnio_echo(message, *args, fg=None, **kwargs)
Print a message to the console with a specific prefix.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
The message to print. |
required |
*args
|
Any
|
Additional arguments to pass to click.secho. |
()
|
fg
|
str
|
The foreground color for the message. |
None
|
**kwargs
|
Any
|
Additional keyword arguments to pass to click.secho. |
{}
|
Source code in afnio/tellurio/cli.py
12 13 14 15 16 17 18 19 20 21 22 | |
afnio.tellurio.cli.cli(verbosity)
Command-line interface for afnio.
This CLI provides commands to authenticate with the Tellurio Studio platform and manage local configuration. Global options such as logging verbosity apply to all subcommands.
Source code in afnio/tellurio/cli.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
afnio.tellurio.cli.login(api_key=None, relogin=False)
Log in to Tellurio using an API key.
This command allows you to authenticate with the Tellurio platform using your API key. If the API key is already stored in the system's keyring, it will be used automatically without prompting the user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
str
|
The user's API key for authentication. |
None
|
relogin
|
bool
|
If |
False
|
Raises:
| Type | Description |
|---|---|
InvalidAPIKeyError
|
If the API key is invalid. |
RuntimeError
|
If the WebSocket connection fails after successful authentication. |
ValueError
|
If the API key is not provided during re-login. |
Exception
|
For any other unexpected errors during login. |
Source code in afnio/tellurio/cli.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | |