r/FastAPI • u/fastlaunchapidev • Nov 25 '25
Other How accurate do you think this image is?
*was created by ai
117
Upvotes
r/FastAPI • u/fastlaunchapidev • Nov 25 '25
*was created by ai
14
u/fabiocfabini Nov 25 '25
What ai did you use to create it?
12
u/pint Nov 25 '25
this is not correct, fastapi returns asgi response, and uvicorn is reponsible for assembling the http. this is the main issue, but the schematic is riddled with odd choices. response serialization is a separate box, but input validation and routing is just buried under "fastapi application". then there is a routing box in the middle, unclear what it does there, probably means route definitions?
12
u/Minimum_Location3462 Nov 25 '25
Middleware is not just post-process, it’s also preprocess, before path operation
1
u/shoot_your_eye_out Nov 25 '25
Middleware is completely wrong. That should be upstream of fastapi for the incoming request.
Broad strokes: it’s a really confusing infographic that gets a lot wrong and doesn’t really communicate how this works.
1
u/Broad_Shoulder_749 Nov 26 '25
It is much simpler than this, even though most of this stuff happens behind the scenes.
In its simplest form, FastApi server rolls up in about 30 lines of code!
0
u/ant1fact Nov 25 '25
Request middleware should be placed on the blue arrow before the arrow reaches the handler function. Overall it looks ok but the middle section is oddly placed
-1
u/_TheFlyingLion_ Nov 25 '25
Is there any accurate diagram of all FastAPI components and process/ architecture¿
-3
u/MichaelEvo Nov 25 '25
This looks accurate to me, based on my own understanding.
1
u/[deleted] Nov 26 '25
[removed] — view removed comment