Add FastAPI as a backend framework option#87
Open
aduquehd wants to merge 2 commits into
Open
Conversation
Implements the same contract as the existing backends: POST /foo and POST /bar return {"success": true} on port 3000, with permissive CORS matching the Django service.
Includes setup/start scripts for Unix and Windows, pinned requirements, a framework README, and root README updates listing the new option.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds FastAPI as a fifth backend framework choice for the interview setup, alongside Rails, Spring, Node, and Django.
Context
FastAPI has become one of the most widely used web frameworks in the Python ecosystem — for many Python developers today it's the default choice for building APIs. Offering it as an option lets people run Minicom on the stack they already use daily, implementing exactly the same contract as the existing backends.
Changes
fastapi/backend with the same functionality as the other frameworks:POST /fooandPOST /barreturn{"success": true}on port 3000, with permissive CORS matching the Django serviceurls.py(central route registration),api.py(endpoint handlers),main.py(app setup + CORS)script/fastapi/setupandscript/fastapi/startfor Mac/Linux/WSL, plus.batequivalents for Windows, modeled on the Django scriptsfastapi==0.139.0,uvicorn==0.51.0) and a frameworkREADME.mdcovering setup and how to add a new moduleREADME.mdupdated to listfastapiin the framework choices, setup examples, and folder indexVerified: both endpoints return the same response as the Django backend (
{"success": true}withAccess-Control-Allow-Origin: *), and the Foo and Bar sites fire the "Yay! Everything works" alert against it.