Closed mishal closed 3 years ago
Hi @mishal - does #2 solve what you are trying to do?
In answer to your question, you need to add the local source first. Configuration sources are checked from first to last, and once a value is found in one of them, it stops.
Closing since no reply and I think #2 is also a suitable solution.
Hi,
I'm building an API for application extensions and I would like to add sections to the root config dynamically. Each extension of the application can add a section for itself to the main config section. Somethig like:
It looks like the order of adding sections and sources is essential, because the expected values are different:
I expect that the source local.conf will override the default values provided by extensions and the settings for
port
from sectiondatabase
andapi_key
from sectionextension1
will be returned.I tried to add the local source as the last, but the results are the same.
Am I doing something wrong?
I'm using python 3.7
Thank you
btw great library :)