Metadata-Version: 2.4
Name: ez-yaml-config
Version: 0.4.2
Summary: Typed config files
Project-URL: Homepage, https://github.com/quarterzip/ez-yaml-config
Project-URL: Issues, https://github.com/quarterzip/ez-yaml-config/issues
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.13
Description-Content-Type: text/markdown
Requires-Dist: pyyaml>=6.0.2
Requires-Dist: pydantic>=2.11.4
Requires-Dist: google-cloud-secret-manager>=2.23.3
Requires-Dist: google-crc32c>=1.7.1
Provides-Extra: dev
Requires-Dist: pre-commit>=4.2.0; extra == "dev"
Requires-Dist: pylint>=3.3.6; extra == "dev"
Requires-Dist: ruff==0.12.0; extra == "dev"
Requires-Dist: uv==0.7.13; extra == "dev"

Install with `pip install ez-yaml-config`

Then define some configuration files like so:
```python
from config import Configuration, gsm_secret

class ConfigBase(Configuration):
    CONFIG_FILE = "settings.yaml"
    CONFIG_FILE_PATH_ENV_VAR = "SETTINGS_PATH"


class LoggingConfig(ConfigBase):
    CONFIG_SECTION = "logging"
    level: Literal["info", "warning", "error"]


class BackendConfig(ConfigBase):
    CONFIG_SECTION = "server"
    host: str
    api_key: Annotated[str, gsm_secret(project="my-gcp-project")]
```

The above Configurations will load a file named `settings.yaml` in the cwd, or from the location set in the `SETTINGS_PATH` environment variable (if its been set). The file should look like this:
```yaml
logging:
    level: info
server:
    host: "localhost"
    api_key: gsm:name-of-gsm-key
```
