LoginSignup
5
2

More than 3 years have passed since last update.

Flask GETのクエリパラメーターを取得する

Last updated at Posted at 2020-08-09

Flask https://flask.palletsprojects.com/en/1.1.x/
でGETのパラメータを取得した時のメモ

@app.route('/search')
def analyzer():

    query = ""

    if request.args.get('q') is not None:
        query = request.args.get('q')
    else:
        query = "パラメーターがないよ"

    return query

で試す

5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2