title: Flask app config from YAML file is not loaded
body: <p>My app needs configs like = <code>app.config['LDAP_BASE_DN'] = 'OU=users,dc=example,dc=org'</code> I want to pass this configurations to a YAML file and then make the app use it. I can load the file using <code>PyYAML</code> or <code>config_with_yaml</code> the problem is i can't set the app to use it as configurations.
  It should work based on "<a href="https://exploreflask.com/en/latest/configuration.html" rel="nofollow noreferrer">https://exploreflask.com/en/latest/configuration.html</a>"</p>
  
  <p>I load my config with <code>cfg = config.load("/Users/pjose/Project/dev_maintenance/backend/config.yaml")</code> then i set my app config to get the data from the yaml file <code>app.config.from_object(cfg)</code> and by calling <code>app.config["LDAP_USERNAME"]</code> it should set the config, but it does not work.</p>
  
  <p>YAML file:</p>
  
  <pre><code>LDAP_USERNAME: 'CN=Hermes Conrad,ou=people,dc=planetexpress,dc=com'
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>  File "/Users/pjose/Project/dev_maintenance/backend/dev_maintenance/__init__.py", line 32, in &lt;module&gt;
      app.config["LDAP_USERNAME"]
  KeyError: 'LDAP_USERNAME'
  </code></pre>