title: Support multiple API versions in flask
body: <p>I started to design a RESTful webservice with Flask and Python and I'm wondering how one would support multiple API versions in the same project.
  I'm thinking of putting the requested API version in the URL like this:</p>
  
  <pre class="lang-none prettyprint-override"><code>/myapp/v1/Users
  </code></pre>
  
  <p>After some time I want to add another endpoint in Version 1.1 of the API and keep everything from v1 which did not change:</p>
  
  <pre class="lang-none prettyprint-override"><code>/myapp/v1.1/Users   &lt;= Same as in v1
  /myapp/v1.1/Books
  </code></pre>
  
  <p>In v2 the "Users"-endpoint is changed:</p>
  
  <pre class="lang-none prettyprint-override"><code>/myapp/v2/Users   &lt;= Changed in v2
  /myapp/v2/Books   &lt;= Same as in v1.1
  </code></pre>
  
  <p>and so on...</p>
  
  <p>Looking at <a href="https://stackoverflow.com/questions/19085166/what-is-the-best-way-to-run-rest-api-versions-with-python-flask">this</a> question the easiest way probably would be something like this:</p>
  
  <pre class="lang-py prettyprint-override"><code>@app.route('/&lt;version&gt;/users')
  def users(version):
      # do something
      return jsonify(response)
  </code></pre>
  
  <p>But I can imagine that this will get harder to maintain with each new API version. Therefore I was wondering if there's any better (= easier to maintain and better structured) way to achieve this with Flask?</p>