aihwkit.cloud.client.utils module
Utilities for the AIHW Composer API.
- class aihwkit.cloud.client.utils.ClientConfiguration[source]
Bases:
objectHelper 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_TOKENenvironment variable.the
aihwkit.confconfiguration 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.confconfiguration file.the
DEFAULT_URLmodule variable.
The
aihwkit.conffile 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.confconfiguration file.- Return type:
Dict
- property token: str
Return the user token.
- property url: str
Return the API URL.