|
|
|
|
|
by graemep
242 days ago
|
|
> In reality, people ended up having to deal with weird bugs because asynchronous Python isn't the most ergonomic That is an understatement. I loathe working with async Python. > For example, people could build an API that will contact OpenAI before returning a response. That's where FastAPI truly shined because of native asynchronous views which provides better performance over Flask's async implementation. TO be fair there are lots of other things that require a response from an API before responding to the request and therefore async reduces resource usage over threads or multi-process. |
|
Agreed. However, these are rare and many people have been abusing asynchronous views instead of delegating the task to a background worker when multiple external requests are required. Showing a spinner while polling a synchronous view is dead simple to implement and more resilient against unexpected outages.