API reference for sovai.api_config
Module: sovai.api_config
sovai.api_config
ApiConfig
class ApiConfig
The main API Configuration
Attributes
token (Optional[str])
token
Optional[str]
base_url (str)
base_url
str
token_type (str)
token_type
verify_ssl (bool)
verify_ssl
bool
version (Optional[str])
version
read_key()
Read .env file with credentials (e.g TOKEN or API_TOKEN) and store to the ApiConfig
Returns
save_key()
Save retrieve token from the server to .env file in the root directory
Returns: None
None
Last updated 28 days ago
def read_key(envpath: Union[str, Path]) -> Optional[str]
def save_key(envpath: Union[str, Path] = '.env') -> None