-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Description
I need to create a user configuration file that if present would override the basic config.
base.config.json - checked in
config.json - gitignore
But the following code does not work. I need to separately check for the config file and then modify the configuration sources.
cfg = ConfigurationSet(
config_from_env(prefix="app_config"),
config_from_json("config.json", read_from_file=True), # Throws error when file is not present
config_from_json("base.config.json", read_from_file=True),
)
It would be nice to have this case handled by the library instead. The interface can look like this:
config_from_json("config.json", read_from_file=True, file_optional=True)
Metadata
Metadata
Assignees
Labels
No labels