📜  如何使用 Flask 从 URL 获取命名参数? - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:07.051000             🧑  作者: Mango

代码示例1
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)