Skip to content

Commit

Permalink
docs: start MADR decision documenting process
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Oct 29, 2024
1 parent e578121 commit 8ee0882
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
35 changes: 35 additions & 0 deletions docs/decisions/0001-fastapi.md
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).
7 changes: 7 additions & 0 deletions docs/decisions/README.md
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.

0 comments on commit 8ee0882

Please sign in to comment.