[RFC] Load multi environment settings from dictionary
See original GitHub issueI have researched documentation and also some source code, but I can’t find any possibility to load configuration from a dictionary. I need this for testing, as we define settings in the test code itself. Generally it would be good to have a wrapper where everything smart and environment dependent is disabled (I know about DynaconfDict, but this doesn’t quite fulfill my needs), especially the dependency on files and env vars as those can cause quite a few issues as I experienced.
Up to now i used DotMap
to achieve similar interface, but at nested levels merging is becoming an issue, thus I’m now trying to decrease prod / test parity by also applying dynaconf in tests.
I am aware that it I can just pass the dict like Dynaconf(**json_config)
, but this results in issues with environments and so on.
Am I missing an option?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
I just fund a workaround, which is definetly not nice but does what I need:
Vulnerable to internal interface changes though.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.