Hi, I have a Python code that needs to be configured according to the env :
- development
- integration
- production
To solve this, I have written all settings in a Python config.py file and I have added 3 other Python files for each environment:
- config_Prod.py for development
- config_Intg.py for integration
- config_Prod.py for production
I am not very satisfied with this. What is the officially recommend way achieve this in Python ?
And what are the best practices to manage this ? I wonder if using a .config or a .yml file wouldn’t be more adapted.
I am also wondering how to configure the logging, as I have currently set it up inside a .py file.
How do you manage development/integration/production specific variables ? do you have examples and url link of best practices to manage this ? Regards