Config.get()#

relationalai
#Config.get(name: str, default: Any|None = None, strict:bool = True) -> Any

Get a configuration parameter value.

Parameters#

NameTypeDescription
namestrThe name of the configuration parameter to get.
defaultAnyOptional default value to return if the configuration parameter is not found.
strictboolOptional flag to raise an error if the configuration parameter is not found and no default value is provided. (Default: True)

Returns#

The value of the configuration parameter.

Example#

Use .get() to get the value of a configuration parameter:

#import relationalai as rai

cfg = rai.Config({
    "account": "<SNOWFLAKE_ACCOUNT>",
    "warehouse": "<SNOWFLAKE_WAREHOUSE>",
    "user": "<SNOWFLAKE_USER>",
    "password": "<SNOWFLAKE_PASSWORD>",
})

# Get the value of the "authenticator" configuration parameter.
print(cfg.get("authenticator"))
# 'snowflake'

See Valid Profile Keys for a list of configuration parameters.

See Also#