Skip to main content
Version: 1.1

Extending Configs

 Example (Click Here)

A common pattern is to extend an existing config, overriding and/or adding new config values to it. The extension is done by including the base configuration, and then overriding the chosen values in the current config.


This page assumes that you are familiar with the contents of The Defaults List.

Extending a config from the same config group:#

defaults:  - db: mysql 

defaults:  - base_mysql
user: omrypassword: secretport: 3307encoding: utf8
host: localhostport: 3306user: ???password: ???


$ python
db:  host: localhost   # from db/base_mysql  port: 3307        # overriden by db/mysql.yaml   user: omry        # populated by db/mysql.yaml  password: secret  # populated by db/mysql.yaml  encoding: utf8    # added by db/mysql.yaml

Extending a config from another config group:#

To extend a config from a different config group, include it using an absolute path (/), and override the package to _here_. (_here_ is described in Packages)

defaults:  - /db_schema/[email protected]_here_

It is otherwise identical to extending a config within the same config group.