Functions
deep_merge
Deep merge override dict into base dict.
Override semantics:
- Dicts: recursively merge
- Lists: r…
deep_merge
def deep_merge(base: dict[str, Any], override: dict[str, Any]) -> dict[str, Any]
Deep merge override dict into base dict.
Override semantics:
- Dicts: recursively merge
- Lists: replace entirely (override wins)
- Primitives: replace (override wins)
Parameters 2
| Name | Type | Default | Description |
|---|---|---|---|
base |
dict[str, Any] |
— | Base configuration dictionary |
override |
dict[str, Any] |
— | Override configuration dictionary |
Returns
Merged dictionary (new dict, does not mutate inputs)dict[str, Any]
—
set_nested_key
Set a nested key in config dictionary using dot notation.
Creates intermediate dicts as needed.
set_nested_key
def set_nested_key(config: dict[str, Any], key_path: str, value: Any) -> None
Set a nested key in config dictionary using dot notation.
Creates intermediate dicts as needed.
Parameters 3
| Name | Type | Default | Description |
|---|---|---|---|
config |
dict[str, Any] |
— | Configuration dictionary to modify (mutates in place) |
key_path |
str |
— | Dot-separated path (e.g., "site.theme.name") |
value |
Any |
— | Value to set |
get_nested_key
Get a nested key from config dictionary using dot notation.
get_nested_key
def get_nested_key(config: dict[str, Any], key_path: str, default: Any = None) -> Any
Get a nested key from config dictionary using dot notation.
Parameters 3
| Name | Type | Default | Description |
|---|---|---|---|
config |
dict[str, Any] |
— | Configuration dictionary |
key_path |
str |
— | Dot-separated path (e.g., "site.theme.name") |
default |
Any |
None |
Default value if key not found |
Returns
Value at key_path, or default if not foundAny
—