title: Adding parameter values to a url in flask python
body: <p>I have the code for the following url:http://localhost/summary/myfile.csv 
  I want the url to look like this:http://localhost/summary?file=myfile.csv </p>
  
  <p>The code is to be written in flask.</p>
  
  <p>My code for the first url is as follows:</p>
  
  <pre><code>@app.route('/summary/&lt;filename&gt;',methods = ['GET'])
  def api_summary(filename):
      url = 'C:\\Users\\Desktop\\myproject\\'
      if os.path.exists(url + filename):
          data = pandas.read_csv( url + filename)
          Numeric_Summary = data.describe().to_dict()
          resp = jsonify(Numeric_Summary)
          resp.status_code = 200
          return resp
  </code></pre>