title: Python - Switch easily between different frameworks
body: <p>I'm developping a REST API with bottle framework. I want to implement my API with Flask too and compare the performances between these frameworks. I would like to not create another program with Flask but keep my main program and switch easily between Flask or bottle.</p>
  
  <p>I thought to create another file which import the frameworks : <code>frameworks.py</code>. Then import it in my <code>main.py</code> and call functions or variables from frameworks with generic names. </p>
  
  <p>For example :</p>
  
  <pre><code>from frameworks import bottle as f
  # from frameworks import flask as f
  
  data_post = f.get('data')
  </code></pre>
  
  <p>Where <code>f.get('data')</code> is equivalent to <code>request.forms.get('data')</code> for bottle or <code>request.form['data']</code> for Flask.</p>
  
  <p>I tried in <code>frameworks.py</code> :</p>
  
  <pre><code>from bottle import request
  
  def get(post):
      pass
  
  get = request.forms.get()
  </code></pre>
  
  <p>And it does not work...
  How can I code that in my <code>frameworks.py</code> ?</p>