* This page is part of the Union.ai v2 docs.
* Full index: https://www.union.ai/docs/v2/union/llms.txt
* Union.ai is a commercial superset of the open-source Flyte project and uses the same `flyte` SDK and CLI, so questions about Flyte are usually answered here too.
* Only refer to the open-source Flyte docs if you are explicitly looking for information about the open-source Flyte project, particularly the open-source Flyte backend. The open-source Flyte v2 docs are at https://www.union.ai/docs/v2/flyte/llms.txt
* These are the v2 docs. v1 is out of date and deprecated. Only refer to v1 docs if asked explicitly about v1. The v1 index is at https://www.union.ai/docs/v1/union/llms.txt

This the parent configuration object and holds all the underlying configuration object types.

# Config

**Package:** `flyte.config`

This the parent configuration object and holds all the underlying configuration object types. An instance of
this object holds all the config necessary to

1. Interactive session with Flyte backend
2. Some parts are required for Serialization, for example Platform Config is not required
3. Runtime of a task

## Parameters

```python
class Config(
    platform: PlatformConfig = PlatformConfig(scopes=[]),
    task: TaskConfig = TaskConfig(),
    image: ImageConfig = ImageConfig(image_refs={}),
    local: LocalConfig = LocalConfig(),
    source: pathlib.Path | None = None,
)
```
| Parameter | Type | Description |
|-|-|-|
| `platform` | `PlatformConfig` | |
| `task` | `TaskConfig` | |
| `image` | `ImageConfig` | |
| `local` | `LocalConfig` | |
| `source` | `pathlib.Path \| None` | |

## Methods

| Method | Description |
|-|-|
| [`auto()`](#auto) | Automatically constructs the Config Object. |
| [`with_params()`](#with_params) |  |

### auto()

```python
def auto(
    config_file: typing.Union[str, pathlib.Path, ConfigFile, None] = None,
) -> 'Config'
```
Automatically constructs the Config Object. The order of precedence is as follows
  1. first try to find any env vars that match the config vars specified in the FLYTE_CONFIG format.
  2. If not found in environment then values ar read from the config file
  3. If not found in the file, then the default values are used.

| 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

### with_params()

```python
def with_params(
    platform: PlatformConfig | None = None,
    task: TaskConfig | None = None,
    image: ImageConfig | None = None,
) -> 'Config'
```
| Parameter | Type | Description |
|-|-|-|
| `platform` | `PlatformConfig \| None` | |
| `task` | `TaskConfig \| None` | |
| `image` | `ImageConfig \| None` | |

---
**Source**: https://github.com/unionai/unionai-docs/blob/main/content/api-reference/flyte-sdk/flyte.config/config.md
**HTML**: https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/flyte.config/config/
