2.0.11
flyte.config
Directory
Classes
| Class | Description |
|---|---|
Config |
This the parent configuration object and holds all the underlying configuration object types. |
Methods
| Method | Description |
|---|---|
auto() |
Automatically constructs the Config Object. |
set_if_exists() |
Given a dict d sets the key k with value of config v, if the config value v is set. |
Methods
auto()
def auto(
config_file: typing.Union[str, pathlib.Path, ConfigFile, None],
) -> ConfigAutomatically constructs the Config Object. The order of precedence is as follows
- If specified, read the config from the provided file path.
- If not specified, the config file is searched in the default locations.
a. ./config.yaml if it exists (current working directory)
b. ./.flyte/config.yaml if it exists (current working directory)
c. <git_root>/.flyte/config.yaml if it exists
d.
UCTL_CONFIGenvironment variable e.FLYTECTL_CONFIGenvironment variable f. ~/.union/config.yaml if it exists g. ~/.flyte/config.yaml if it exists - If any value is not found in the config file, the default value is used.
- For any value there are environment variables that match the config variable names, those will override
| Parameter | Type | Description |
|---|---|---|
config_file |
typing.Union[str, pathlib.Path, ConfigFile, None] |
file path to read the config from, if not specified default locations are searched |
Returns: Config
set_if_exists()
def set_if_exists(
d: dict,
k: str,
val: typing.Any,
) -> dictGiven a dict d sets the key k with value of config v, if the config value v is set
and return the updated dictionary.
| Parameter | Type | Description |
|---|---|---|
d |
dict |
|
k |
str |
|
val |
typing.Any |