-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: start MADR decision documenting process
- Loading branch information
1 parent
e578121
commit 8ee0882
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Use FastAPI as Python web API framework | ||
|
||
## Context and Problem Statement | ||
|
||
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](https://fastapi.tiangolo.com/alternatives) in FastAPI docs. | ||
|
||
## Considered Options | ||
|
||
- Django Rest Framework | ||
- Flask | ||
- FastAPI | ||
|
||
## Decision Outcome | ||
|
||
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. | ||
|
||
### Consequences | ||
|
||
- 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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Architectural Decisions | ||
|
||
A Markdown and Architectural Decision Records documenting the technical decision | ||
taken in this project. | ||
|
||
This process was started 29/10/2024, so does not necessarily capture all decisions | ||
from the projects inception. |