Hacker News new | ask | show | jobs
by flakes 546 days ago
FastAPI uses uvicorn which is ASGI, but you can choose to implement endpoints as either async or sync. I have implemented servers using both styles. Very pleasant to work with, and everything is type hinted, which is a must for me in any serious Python project.
1 comments

You don't want to use uvicorn with synchronous views though or you're limited to a single request in flight.

If for some reason you need to mix sync/async views (maybe during a migration) you can use uvicorn as a gunicorn worker type, and run multiple workers. But your async views will still scale much better.