Metadata-Version: 2.5
Name: strataconf
Version: 1.0.0
Summary: A layered configuration library based on OmegaConf with nested includes, _target_ instantiation, YAML-based argparse definitions and fingerprinting
Project-URL: Documentation, https://fastfedora.github.io/strataconf/
Project-URL: GitHub, https://github.com/fastfedora/strataconf
Author-email: Trevor Lohrbeer <trevor@fastfedora.com>
License: MIT
License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: cattrs>=26.1.0
Requires-Dist: omegaconf~=2.3.0
Requires-Dist: packaging>=24.0
Requires-Dist: pydantic~=2.12
Description-Content-Type: text/markdown

# StrataConf

A layered configuration library for Python. StrataConf merges configuration from three layers:
defaults, configs and overrides. Each layer can have multiple sources with all sources and layers
being maintained independently.

Features include:

- Includes via `includes:` from files or published packages
- Interpolation via `${...}` using configuration paths or resolvers
- Object instantiation via `_target_` with typed coercion
- Configuration of `argparse` from YAML files to enable command-line overrides
- Extracting field defaults from dataclass/Pydantic classes
- Overriding function parameter defaults via the `config_defaults` decorator
- Tracking actively-used configuration values
- Creating a unique fingerprint of a subset of configuration values

It is built on [OmegaConf](https://omegaconf.readthedocs.io/), with some changes to streamline usage
(e.g., resolvers are not namespaced).

## Documentation

Full documentation, including a user guide and API reference, is available at
[fastfedora.github.io/strataconf](https://fastfedora.github.io/strataconf/).

## Install

```bash
pip install strataconf
```

## Quick Start

```python
from strataconf import Config

config = Config()
config.load_defaults("configs/defaults.yaml")     # base layer
config.load_config("configs/config.yaml")         # main layer, on top of defaults
config.add_overrides({"server": {"port": 9000}})  # highest-precedence layer

port = config.get("server.port")                  # merged + interpolated value
```

See the [documentation](https://fastfedora.github.io/strataconf/) for the full guide and API
reference.

## Development

```bash
uv sync
just test      # run the test suite
just lint      # ruff + pyright
just docs      # preview the docs (Quarto)
```

## License

MIT — see [LICENSE](LICENSE).
