I want to create api in python, so I choose quart framework, and I manager to create api, but I want to process multiple request at same time, currently when I make 2 simultaneous request they process in series mean when first request finish then second request start,
What happening currently:
means single request take 10 second,
But when 2 request simultaneously made first request takes 10 s, and
second request takes 20 s
What I want:
I want that,
If we made 2 request simultaneously
First request response in 10 second. and
Second request response in 10 second.
Note: request are that make do third party api and response return in 10 seconds
What I am doing
import quart
@app.route('/', methods=['GET'])
async def home():
params = req.args
data= pipmodule.get_data(params)
# data available after 10 second
if __name__ == '__main__':
if name == 'main': uvicorn.run(app, host='localhost', port=5000)