In recent years, I have mainly used django. Django uses an environment variable DJANGO_SETTINGS_MODULEto find its configuration.
Now I have a project in which I am not using django, and I would like to have a simple and clear way to load the configuration.
Example:
I want the global boolean to enable or disable debugging:
settings.DEBUG
I think there are thousands of ways to do this.
But what is the most pythonic way to store and load project settings?
... perhaps the Python community has already settled on the well-known standard method that I don't know yet.
source
share