Chapters¶
This textbook is organized into 9 chapters covering the mountainash-settings typed configuration framework. Chapters are sequenced so that each builds on the concepts introduced in earlier chapters.
Chapter List¶
- Pydantic and Configuration Foundations — Prerequisite knowledge including Pydantic BaseModel/BaseSettings, field validators, model config, file formats, environment variables, decorators, discriminated unions, and SecretStr.
- MountainAsh Base Settings — The MountainAshBaseSettings class, its model config, post-init lifecycle, source customization, validation invariants, and environment variable configuration.
- Settings Parameters and Merge Strategies — The SettingsParameters class with structural/runtime field split, custom hash/eq, parameter factories, and three merge strategies.
- File Handling, Kwargs, and Field Templating — FileHandler and KwargsHandler classes, multi-format file loading, template syntax, field name placeholders, and template resolution.
- Secrets Resolution — The secrets registry, provider protocol, two-pass resolution pipeline, secret prefix syntax, and pluggable providers (Vault, SSM, Key Vault).
- Connection Profiles — ProfileDescriptor, ParameterSpec with tiers/defaults/transforms/validators, MISSING sentinel, DescriptorProfile, and dynamic field installation.
- Profile Registry and Invariants — The Registry class, name-keyed store, decorator registration, duplicate prevention, descriptor invariants, and invariant test generation.
- Authentication System — AuthSpec base class, kind literal, discriminated union assembly, dispatch function, driver kwargs mapping, 11 concrete auth modes, and custom extension.
- Caching, Settings Management, and App Settings — LRU caching, get_settings function, structural cache keys, runtime overrides, SettingsManager, and the AppSettings convenience class.
Concept Coverage¶
This textbook covers all 110 concepts from the mountainash-settings learning graph, distributed across 9 chapters with no dependency violations.