How to share the configuration globally ? #2357
Unanswered
TheUncharted
asked this question in
Q&A
Replies: 1 comment
-
Yes, this is what I do. Once you use the decorator (or the compose API) to get a config object, use normal Python idioms to share it between components of your application. Some common patterns are:
Generally programs with global state are harder to reason about and maintain, so for most cases I recommend the first option above. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
What is the best practice / simple way for sharing configuration through all the application with Hydra ?
For example I have a project and multiple files that may use a variables from the configuration
Do you use the decorator to get a config object that you inject everywhere ?
Beta Was this translation helpful? Give feedback.
All reactions