3 ms·
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 pleasa
by flakes 2y 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.
- seabrookmx 2y agoYou 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.