aihwkit.cloud.client.utils module
Utilities for the AIHW Composer API.
- class aihwkit.cloud.client.utils.ClientConfiguration[source]
Bases:
object
Helper for retrieving the user configuration.
Utility for retrieving the user configuration. The API token will be retrieved from, in order of preference:
the
AIHW_API_TOKEN
environment variable.the
aihwkit.conf
configuration file.if the API token could not be found, it will return
None
.
The API URL will be retrieved from, in order of preference:
the
aihwkit.conf
configuration file.the
DEFAULT_URL
module variable.
The
aihwkit.conf
file is read from:the current working directory.
XDG_CONFIG_HOME
/aihwkit
(by default,~/.config/aihwkit
).
- parse_config()[source]
Read the configuration from a config file.
- Returns:
A dictionary with the contents of the
aihwkit.conf
configuration file.- Return type:
Dict
- property token: str
Return the user token.
- property url: str
Return the API URL.