-
-
Notifications
You must be signed in to change notification settings - Fork 46
0001 fastapi
svchot edited this page Oct 29, 2024
·
1 revision
We need to serve content from a backend linked to a database, to the frontend for display.
Historically Django (DRF) and Flask were best. Since asgi
had more adoption,
async frameworks are key.
FastAPI was the first to market to combine many powerful features:
- ASGI Starlette + Uvicorn server.
- Pydantic validation.
- OpenAPI spec parsing.
Alternatives page in FastAPI docs.
- Django Rest Framework
- Flask
- FastAPI
We chose FastAPI in 2022 is it was a well adopted, with a large community, and has great developer experience. It's also quite performant.
- Good, because code is much more concise and understandable.
- Good, because endpoints are auto-documented as OpenAPI.
- Bad, because as with any decision at this level, migration away becomes difficult (would require a rewrite using another framework).