1

This is an example of Flask code for getting multiple query parameters:

@app.route('/createcm')
def createcm():
   product = request.args.get('product', None)
   color = request.args.get('color', None)
   size = request.args.get('size', None)

   return "response"

The question is, how can I create multiple query params in FastAPI framework? The user could select all three query params, but could also select only two or one. Based on these params, it should return data from the database.

Thanks!

Chris
  • 18,724
  • 6
  • 46
  • 80
Denmla
  • 135
  • 1
  • 8

0 Answers0