title: In python flask, how do you get the path parameters outside of the route function?
body: <p>In flask, you can define path parameters like so:</p>
  
  <pre><code>@app.route('/data/&lt;section&gt;')
  def data(section):
     print section
  </code></pre>
  
  <p>In The above example, you can access the section variable only from the data endpoint (unless you pass it around in function parameter)</p>
  
  <p>You can also get the query parameters by accessing the request object. this works from the endpoint function as well as any other called function, without needing to pass anything around</p>
  
  <pre><code>request.args['param_name']
  </code></pre>
  
  <p>my question is: is in possible to access the path parameter (like section above) in the same way as the query parameters?</p>