title: app_config[config_name] getting KeyError null value for flask environment
body: <p>I am creating employee management software in python in flask environement by referring this code </p>
  
  <p><a href="https://github.com/littlewonder/squadmaster" rel="nofollow noreferrer">https://github.com/littlewonder/squadmaster</a></p>
  
  <p>i have installed pip , flask an other relevant libraries .i have also created virtal environment .I put the project folder inside the flask as well .</p>
  
  <p>folder structure in side flask folder is like this </p>
  
  <p><a href="https://i.stack.imgur.com/VOzWu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VOzWu.png" alt="enter image description here"></a></p>
  
  <p>when  i tried to tun run.py . it gives me error</p>
  
  <pre><code>app.config.from_object(app_config[config_name]) KeyError: None
  </code></pre>
  
  <p>this is my run.py file</p>
  
  <pre><code>import os
  
  from app import create_app
  
  config_name = os.getenv('FLASK_CONFIG')
  app = create_app(config_name)
  
  if __name__ == '__main__':
      app.run()
  </code></pre>
  
  <p>i have faced similar question </p>
  
  <p><a href="https://stackoverflow.com/questions/34811823/flask-does-not-load-configuration">Flask does not load configuration</a></p>
  
  <p>i have implemented its solution and use these strings</p>
  
  <pre><code>app.config.from_object('myapplication.default_settings')
  
  app.config.from_object('my_app.config.{}'.format(config_name))
  </code></pre>
  
  <p>I have set FLASK_CONFIG as in upper as documented 
  I have setup the FLASK_CONFIG as environment variable in system build path . but it results me to error as KeyError = "full path" .</p>
  
  <p>i have also tried to set 
  FLASK_CONFIG ='development'
  and FLASK_CONFIG =DevelopmentConfig </p>
  
  <p>as mentioned in config.py</p>
  
  <pre><code>app_config = {
      'development': DevelopmentConfig,
      'production': ProductionConfig
  }
  </code></pre>
  
  <p>what else can i tried  to get a hint whats going wrong . need some suggestion</p>