# config

Python API: `luxonis_ml.utils.config`

## Classes

### LuxonisConfig

Class for storing configuration.

#### Methods

##### get

```python
def get(key_merged: str, default: Any = None) -> Any:
```

Return a value from the config based on the given key.

If the key doesn't exist, the default value is returned.

Parameters

 * `key_merged` (`str`): Key as a string with levels separated by dots.
 * `default` (`Any`): Default value to return if the key doesn't exist.

Returns

 * `Any`: Value of the key, or the default value.

Raises

 * `ValueError`: If a list is accessed with a non-integer key.

##### get_config

```python
def get_config(cfg: PathType | Params | None = None, overrides: Params | dict[str, Any] | list[str] | tuple[str, ...] | None = None) -> Self:
```

Load config from a yaml file or a dictionary.

Parameters

 * `cfg` (`PathType | Params | None`): Path to a config file or a dictionary.
 * `overrides` (`Params | dict[str, Any] | list[str] | tuple[str, ...] | None`): CLI overrides. Can be a dictionary mapping
   "dotted" keys to unparsed string or Python values, or a list or a tuple of alternating key-value pairs.

Returns

 * `Self`: Instance of the config class.

Raises

 * `ValueError`: If neither `cfg` nor `overrides` is provided, or if `overrides` is a list or a tuple with an odd number of items.

##### get_json_schema

```python
def get_json_schema(self) -> Params:
```

Return the JSON schema of the config.

> **Deprecated**
> Deprecated since version 0.9.0:Use `model_json_schema(mode='validation')` instead.

Returns

 * `Params`: Dictionary with the JSON schema.

##### save_data

```python
def save_data(path: PathType):
```

Save the config to a YAML file.

Parameters

 * `path` (`PathType`): Path to the file where the config should be saved.

## Attributes

### T
