title: Import from YAML file
body: <p>I have a <code>config.yaml</code> file that I want to import in my <code>app.py</code>.</p>
  
  <p>This is my folder structure:</p>
  
  <pre><code> /root
        __init__.py
        app.py
        config.yaml
  </code></pre>
  
  <p><strong>App.py:</strong></p>
  
  <pre><code>   import logging
     import config
     from flask import Flask
  
     app = Flask(__name__)
     logger = logging.getLogger(__name__)
  
     app.run(port=5001)
  </code></pre>
  
  <p>I have no problem importing other Python modules (<code>.py</code>) but when I try to import my YAML file, i get:</p>
  
  <pre><code>  ImportError: No module named config
  </code></pre>
  
  <p>Does anyone know why this does not work? Do I need any dependencies to be able to import a YAML file like this?</p>