This example illustrates how data can be fetched from a source (YAMLFile) and read into an instance of a specific type (FooSettings), validated using pydantic.
This example has a single source for the sake of simplicity, but in normal situations several layers would be used (e.g. settings file, env specific settings file, env variables, etc.).
This example shows how to load app settings from a TOML file, and from environment variables, filtered by "APP_" prefix.
This example shows how to load app settings from a JSON file, and from environment variables, filtered by "APP_" prefix and obtained from a .env file (this is optional!), and how values can be overridden.
This example illustrates a way to override settings from a common file, using an environment specific settings file.
This example shows how nested values can be overridden using strings.
This example shows how to override nested properties in arrays using environment variables.
This example shows how to override nested properties using environment variables.