Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How can I get the named parameters from a URL using Flask?

from flask import request

@app.route('/my-route')
def my_route():
  page = request.args.get('page', default = 1, type = int)
  filter = request.args.get('filter', default = '*', type = str)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #I #named #parameters #URL
ADD COMMENT
Topic
Name
9+1 =