Async Techniques and Examples in Python Transcripts
Chapter: asyncio-based web frameworks
Lecture: Demo: Introducing Quart for async Flask

Login or purchase this course to watch this video and the rest of the course contents.
0:00 You saw the design decision
0:01 Flask is not intended to support async
0:04 and currently it doesn't maybe it will at some point.
0:08 So what do you do? Give up?
0:10 No, you can go use this thing called Quart.
0:13 Flask, Quart, Bottle, things like that.
0:15 So Quart is a Python web microframework just like Flask
0:19 it's based on asyncio and it has very good
0:22 compatibility with Flask.
0:24 What does that mean? It means has the same API as Flask
0:27 it means even the extensions you can install
0:29 into Flask are compatible with Quart.
0:32 So if you have a Flask app, chances are
0:34 you can tweak it a tiny bit, make it a Quart app
0:37 and then it becomes asyncio enabled.
0:41 That is our goal, our goal is to take our work in Flask app
0:43 that we saw previously and convert it to Quart
0:47 and that conversion will mean a little bit
0:49 of stuff to change the framework.
0:51 And then, more work to actually reimplement
0:54 our services that call external services
0:57 in asyncio capable ways.
1:00 We already have done that once or twice
1:01 so it's not a big deal but we do have to go through
1:03 those steps to do the conversion.