title: How to divide flask app into multiple py files?
body: <p>My flask application currently consists of a single <code>test.py</code> file with multiple routes and the <code>main()</code> route defined. Is there some way I could create a <code>test2.py</code> file that contains routes that were not handled in <code>test.py</code>?</p>
  
  <pre><code>@app.route('/somepath')
  def somehandler():
      # Handler code here
  </code></pre>
  
  <p>I am concerned that there are too many routes in <code>test.py</code> and would like to make it such that I can run <code>python test.py</code>, which will also pick up the routes on <code>test.py</code> as if it were part of the same file. What changes to I have to make in <code>test.py</code> and/or include in <code>test2.py</code> to get this to work?</p>