whylogs.api.whylabs.session.config#

Module Contents#

Classes#

EnvVariableName

Generic enumeration.

ConfigVariableName

Generic enumeration.

InitConfig

SessionConfig

ConfigFile

Attributes#

whylogs.api.whylabs.session.config.INIT_DOCS = 'https://docs.whylabs.ai/docs/whylabs-whylogs-init'#
exception whylogs.api.whylabs.session.config.InitException#

Bases: Exception

Common base class for all non-exit exceptions.

class args#
with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

class whylogs.api.whylabs.session.config.EnvVariableName#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

WHYLABS_API_KEY = 'WHYLABS_API_KEY'#
WHYLABS_SESSION_ID = 'WHYLABS_SESSION_ID'#
WHYLABS_ORG_ID = 'WHYLABS_DEFAULT_ORG_ID'#
WHYLABS_DEFAULT_DATASET_ID = 'WHYLABS_DEFAULT_DATASET_ID'#
WHYLOGS_CONFIG_PATH = 'WHYLOGS_CONFIG_PATH'#
WHYLABS_API_ENDPOINT = 'WHYLABS_API_ENDPOINT'#
WHYLABS_REFERENCE_PROFILE_NAME = 'WHYLABS_REFERENCE_PROFILE_NAME'#
WHYLABS_PRIVATE_API_ENDPOINT = 'WHYLABS_PRIVATE_API_ENDPOINT'#
WHYLABS_PRIVATE_S3_ENDPOINT = 'WHYLABS_PRIVATE_S3_ENDPOINT'#
HTTP_PROXY = 'HTTP_PROXY'#
HTTPS_PROXY = 'HTTPS_PROXY'#
name()#

The name of the Enum member.

value()#

The value of the Enum member.

class whylogs.api.whylabs.session.config.ConfigVariableName#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

API_KEY = 'api_key'#
ORG_ID = 'org_id'#
SESSION_ID = 'session_id'#
WHYLABS_API_ENDPOINT = 'whylabs_api_endpoint'#
USER_GUID = 'user_guid'#
DEFAULT_DATASET_ID = 'default_dataset_id'#
WHYLABS_REFERENCE_PROFILE_NAME = 'whylabs_reference_profile_name'#
WHYLABS_PRIVATE_API_ENDPOINT = 'whylabs_private_api_endpoint'#
WHYLABS_PRIVATE_S3_ENDPOINT = 'whylabs_private_s3_endpoint'#
HTTP_PROXY = 'http_proxy'#
HTTPS_PROXY = 'https_proxy'#
name()#

The name of the Enum member.

value()#

The value of the Enum member.

class whylogs.api.whylabs.session.config.InitConfig#
whylabs_api_key: Optional[str]#
allow_anonymous: bool = True#
allow_local: bool = False#
default_dataset_id: Optional[str]#
config_path: Optional[str]#
force_local: Optional[bool]#
class whylogs.api.whylabs.session.config.SessionConfig(init_config: Optional[InitConfig] = None)#
Parameters

init_config (Optional[InitConfig]) –

get_session_type() whylogs.api.whylabs.session.session_types.SessionType#
Return type

whylogs.api.whylabs.session.session_types.SessionType

get_https_proxy() Optional[str]#
Return type

Optional[str]

set_https_proxy(proxy: str) None#
Parameters

proxy (str) –

Return type

None

get_http_proxy() Optional[str]#
Return type

Optional[str]

set_http_proxy(proxy: str) None#
Parameters

proxy (str) –

Return type

None

get_whylabs_private_api_endpoint() Optional[str]#
Return type

Optional[str]

set_whylabs_private_api_endpoint(endpoint: str) None#
Parameters

endpoint (str) –

Return type

None

get_whylabs_private_s3_endpoint() Optional[str]#
Return type

Optional[str]

set_whylabs_private_s3_endpoint(endpoint: str) None#
Parameters

endpoint (str) –

Return type

None

get_whylabs_refernce_profile_name() Optional[str]#
Return type

Optional[str]

set_whylabs_refernce_profile_name(name: str) None#
Parameters

name (str) –

Return type

None

get_whylabs_endpoint() str#
Return type

str

set_whylabs_endpoint(endpoint: str) None#
Parameters

endpoint (str) –

Return type

None

get_config_file_path() pathlib.Path#
Return type

pathlib.Path

get_default_dataset_id() Optional[str]#
Return type

Optional[str]

require_default_dataset_id() str#
Return type

str

set_default_dataset_id(dataset_id: str) None#
Parameters

dataset_id (str) –

Return type

None

get_org_id() Optional[str]#
Return type

Optional[str]

require_org_id() str#
Return type

str

set_org_id(org_id: str) None#
Parameters

org_id (str) –

Return type

None

get_api_key() Optional[str]#
Return type

Optional[str]

get_env_api_key() Optional[str]#
Return type

Optional[str]

require_api_key() str#
Return type

str

set_api_key(api_key: str) None#
Parameters

api_key (str) –

Return type

None

get_user_guid() Optional[str]#
Return type

Optional[str]

set_user_guid(user_guid: str) None#
Parameters

user_guid (str) –

Return type

None

get_session_id() Optional[str]#
Return type

Optional[str]

set_session_id(sessionId: str) None#
Parameters

sessionId (str) –

Return type

None

remove_session_id() None#
Return type

None

reset_config() None#
Return type

None

notify_session_type() None#
Return type

None

class whylogs.api.whylabs.session.config.ConfigFile#
static create_parser(config_path: pathlib.Path) configparser.ConfigParser#
Parameters

config_path (pathlib.Path) –

Return type

configparser.ConfigParser

static get_variable_from_input(variable_name: ConfigVariableName) str#
Parameters

variable_name (ConfigVariableName) –

Return type

str

static get_variable_from_getpass(variable_name: ConfigVariableName) str#
Parameters

variable_name (ConfigVariableName) –

Return type

str

static get_variable_from_config_file(parser: configparser.ConfigParser, key: ConfigVariableName) Optional[str]#
Parameters
Return type

Optional[str]

static set_variable_to_config_file(parser: configparser.ConfigParser, auth_path: pathlib.Path, key: ConfigVariableName, value: str) None#
Parameters
Return type

None

static remove_variable_from_config_file(parser: configparser.ConfigParser, auth_path: pathlib.Path, key: ConfigVariableName) None#
Parameters
Return type

None

static remove_all_variables_from_config_file(parser: configparser.ConfigParser, auth_path: pathlib.Path) None#
Parameters
Return type

None