kumoai.init#
- kumoai.init(url=None, api_key=None, snowflake_credentials=None, snowflake_application=None, log_level='INFO')[source]#
Initializes and authenticates the API key against the Kumo service. Successful authentication is required to use the SDK.
Example
>>> import kumoai >>> kumoai.init(url="<api_url>", api_key="<api_key>")
- Parameters:
url (
Optional[str]) – The Kumo API endpoint. Can also be provided via theKUMO_API_ENDPOINTenvronment variable. Will be inferred from the provided API key, if not provided.api_key (
Optional[str]) – The Kumo API key. Can also be provided via theKUMO_API_KEYenvironment variable.snowflake_credentials (
Optional[Dict[str,str]]) – The Snowflake credentials to authenticate against the Kumo service. The dictionary should contain the keys"user","password", and"account". This should only be provided for SPCS.snowflake_application (
Optional[str]) – The Snowflake application.log_level (
str) – The logging level that Kumo operates under. Defaults to INFO; for more information, please seeset_log_level. Can also be set with the environment variableKUMOAI_LOG.
- Return type: