Skip to content

Advanced#

Power-user features for complex configuration setups. Most apps won't need all of these; pick what applies.

Merging & Strategies#

Fine-tune how multiple sources are combined.

Page What you'll learn
Merge Strategies Per-field merge strategies; custom source-level strategy
Field Groups Enforce that related fields are always changed together
Nested Resolve Resolve conflicts between flat keys and JSON values in ENV sources
Skip Behaviors Skip broken, missing, or invalid sources and fields

Sources#

Integrate additional config sources or build your own.

Page What you'll learn
Config Search Automatic config file discovery
ArgparseSource Load argparse CLI arguments as a config source
Custom CLI Source Plug in click, typer, or your own CLI parser
VaultSource Fetch secrets from HashiCorp Vault
Custom Remote Source Implement your own remote backend (AWS, Azure, Consul …)
Custom Types Add support for new Python types via type_loaders
Custom Sources Implement your own source class or use the SourceProtocol interface directly
Cross-Source Refs Reference values from one source inside another
Conditional Sources Activate sources based on environment or other config values

Values#

Control how field values are expanded and interpreted.

Page What you'll learn
ENV Expansion Expand ${VAR} references inside config values
Special Types SecretStr, ByteSize, PaymentCardNumber, URL, Base64Url*

Observability#

Understand what dature loaded and where it came from.

Page What you'll learn
Debug & Reports LoadReport, FieldOrigin, debug logging
Caching Cache loaded configs with TTL and bucket-aligned invalidation