title: What is the best method for setting up a config file in Python
body: <p>I realise this question as been asked before (<a href="https://stackoverflow.com/questions/5055042/whats-the-best-practice-using-a-settings-file-in-python">What&#39;s the best practice using a settings file in Python?</a>) but seeing as this was asked 7 years ago, I feel it is valid to discuss again seeing as how technologies have evolved.</p>
  
  <p>I have a python project that requires different configurations to be used based on the value of an environment variable. Since making use of the environment variable to choose a config file is simple enough, my question is as follows:</p>
  
  <p><strong>What format is seen as the best practice in the software industry for setting up a configuration file in python, when multiple configurations are needed based on the environment?</strong></p>
  
  <p>I realise that python comes with a ConfigParser module but I was wondering if it might be better to use a format such as YAML or JSON because of there raise in popularity due to their ease of use across languages. Which format is seen as easier to maintain when you have multiple configurations?</p>