I am doing migration from flask to fastapi in python and I'm having a problem to convert this peace of code into fastapi
from flask_restx import Resource, Api, fields, reqparse //some code to generate uuid and add it to the request after login reqParser = reqparse.RequestParser() reqParser.add_argument('sid', help='session id', required=True)
Their is any way to convert it into fastapi? I tied to search in their doc but found none.
You can check out the request object which contains all the information about your incoming request.
from fastapi import Request @app.get("/dummy") async def dummy(request: Request): print(request.__dict__)
1.4m articles
1.4m replys
5 comments
57.0k users