Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Allow multiple settings files to be merged into one. #86

Closed
6 tasks done
rochacbruno opened this issue Sep 21, 2018 · 0 comments
Closed
6 tasks done

RFC: Allow multiple settings files to be merged into one. #86

rochacbruno opened this issue Sep 21, 2018 · 0 comments

Comments

@rochacbruno
Copy link
Member

rochacbruno commented Sep 21, 2018

Targeting plugin based applications take as example:

Configuration for general program is in export SETTINGS_FOR_DYNACONF=/etc/program/settings.ext (ext being any of the supported formats yaml, json, ini, toml etc)

That same program has plugins and plugin stores its settings under different path like /etc/plugin_name/settings.yaml

RFC: Allow include of settings files in different formats.

Then /etc/program/settings.yaml

DEFAULT:
    DYNACONF_INCLUDE:
        - /etc/plugin_name/settings.yaml
        - /etc/other_plugin_name/settings.toml
        - /etc/settings_folder/* 

or toml

[default]
dynaconf_include = ["path1", "path2"]

or json

{
   "default": {
        "dynaconf_include": ["path1", "path2"]
    }
}

then All the loaders will take the special DYNACONF_INCLUDE key then load values from each of the files listed using the normal pipeline.

Requirements

  • Backwards compatibility
  • Multiple [envs] should be considered
  • Preserve the ordering
  • Nested includes should have a maximum recursion level
  • When the path is a directory, glob should be used and load in alpha order
  • All file formats should be supported, the functionality should be in BaseLoader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant