Python Flask – Getting Query Param Value

Hello everyone, In this post, you will learn, How to get query param value in Python Flask framework. The example program has been tested and shared in the same post.

Example Program

from flask import Flask, request

app = Flask(__name__)

def hello():
    name = request.args.get('name')
    return 'Hello '+name


 * Serving Flask app "app" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on (Press CTRL+C to quit)
Python Flask – Getting Query Param Value