title: Import module in Flask
body: <p>I am using python flask. I want to import a module from a different directory. </p>
  
  <p>I have file called <code>hello.py</code></p>
  
  <p>PATH = project/app/hello.py</p>
  
  <pre><code>app = Flask(__name__)
  </code></pre>
  
  <p>I have another file called <code>tables.py</code></p>
  
  <p>PATH = project/db/migration/tables.py</p>
  
  <pre><code>app.config("Database")
  </code></pre>
  
  <p>So, I need to import app from hello.py</p>
  
  <pre><code>from app.hello import app
  app.config("Database")
  </code></pre>
  
  <p>I am executing the script <code>tables.py</code> like, </p>
  
  <pre><code>cd project/db/migration
  python3 tables.py
  </code></pre>
  
  <p>It is saying <code>no module found app.hello</code></p>