r/programming • u/Holiday_Serve9696 • Aug 02 '25
How FastAPI Works
https://fastlaunchapi.dev/blog/how-fastapi-works/[removed]
116
Upvotes
r/programming • u/Holiday_Serve9696 • Aug 02 '25
[removed]
View all comments
Show parent comment
-1
u/Big_Combination9890 Aug 03 '25 edited Aug 03 '25
I'm sorry, what?
Not sure what you mean by "parameters to come in for validation", but if you're talking about validating payloads, even with just the stdlib, you already get that functionality pretty much for free.
This will only unmarshal if the payload fulfills the type. And since you can nest types, you can make this as complex as you want. Here is the pydantic version:
Not much less complexity. And it's a 3rd party library.
The only sizeable difference; the go code will accept missing fields to their zero-value. Which can be tested for pretty easily.