1from flask import request
2
3@app.route('/my-route')
4def my_route():
5 page = request.args.get('page', default = 1, type = int)
6 filter = request.args.get('filter', default = '*', type = str)
1from flask import request
2
3@app.route(...)
4def login():
5 username = request.args.get('username')
6 password = request.args.get('password')
1/my-route?page=34 -> page: 34 filter: '*'
2/my-route -> page: 1 filter: '*'
3/my-route?page=10&filter=test -> page: 10 filter: 'test'
4/my-route?page=10&filter=10 -> page: 10 filter: '10'
5/my-route?page=*&filter=* -> page: 1 filter: '*'