Functions
find_config_file
1
Path | None
▼
Find a pounce config file in the given (or current) directory.
find_config_file
1
Path | None
▼
def find_config_file(search_dir: Path | None = None) -> Path | None
Parameters
| Name | Type | Description |
|---|---|---|
search_dir |
Path | None |
Default:None
|
Returns
Path | None
load_config_file
1
dict[str, Any]
▼
Load pounce configuration from a TOML file.
For ``pounce.toml``, the entire fi…
load_config_file
1
dict[str, Any]
▼
def load_config_file(path: Path) -> dict[str, Any]
Load pounce configuration from a TOML file.
Forpounce.toml, the entire file is treated as config.
Forpyproject.toml, reads the [tool.pounce]section.
Parameters
| Name | Type | Description |
|---|---|---|
path |
Path |
Returns
dict[str, Any]
_validate_and_coerce
2
dict[str, Any]
▼
Validate keys and coerce types to match ServerConfig fields.
_validate_and_coerce
2
dict[str, Any]
▼
def _validate_and_coerce(data: dict[str, Any], source: Path) -> dict[str, Any]
Parameters
| Name | Type | Description |
|---|---|---|
data |
dict[str, Any] |
|
source |
Path |
Returns
dict[str, Any]
load_config_with_overrides
3
dict[str, Any]
▼
Load config file and merge with CLI overrides.
CLI overrides always win. Only …
load_config_with_overrides
3
dict[str, Any]
▼
def load_config_with_overrides(cli_overrides: dict[str, Any], *, search_dir: Path | None = None, config_path: Path | None = None) -> dict[str, Any]
Load config file and merge with CLI overrides.
CLI overrides always win. Only non-None CLI values are treated as overrides (so that unset CLI flags don't mask file values).
Parameters
| Name | Type | Description |
|---|---|---|
cli_overrides |
dict[str, Any] |
Dict of CLI arg values. Keys with None values are treated as "not set" and won't override file config. |
search_dir |
Path | None |
Directory to search for config files. Default:None
|
config_path |
Path | None |
Explicit config file path (skips search). Default:None
|
Returns
dict[str, Any]