title: Reading YAML config file in python and using variables
body: <p>Say I have a yaml config file such as:</p>
  
  <pre><code>test1:
      minVolt: -1
      maxVolt: 1
  test2:
      curr: 5
      volt: 5
  </code></pre>
  
  <p>I can read the file into python using:</p>
  
  <pre><code>import yaml
  
  with open("config.yaml", "r") as f:
      config = yaml.load(f)
  </code></pre>
  
  <p>Then I can access the variables with </p>
  
  <pre><code>config['test1']['minVolt']
  </code></pre>
  
  <p>Style-wise, what is the best way to use variables from the config file? I will be using the variables in multiple modules. If I simply access the variables as shown above, if something is renamed, I will need to rename every instance of the variable. </p>
  
  <p>Just wondering what the best or common practices for using variables from a config file in different modules. </p>