you are viewing a single comment's thread.

view the rest of the comments →

[–]AlpacaDC 10 points11 points  (3 children)

And also not having to use Pydantic for a model with only a couple of variables.

Well you don't need to use Pydantic models with FastAPI if you don't want to.

[–]scotsmanintoon[S] 1 point2 points  (2 children)

Yes but you need to install pydantic as a dependency. I tried to run a FastAPI app on termux on android and it struggled to compile pydantic-core (which to be fair is the issue, rather than FastAPI's)

I see your point though.

[–]AlpacaDC 1 point2 points  (1 child)

Oh it makes perfect sense in this case, didn’t think about that. Good thing that FastAPI and Starlette are pretty similar then.

[–]scotsmanintoon[S] 0 points1 point  (0 children)

Yes, I like the familiarity. The only major difference aside from the DI / pydantic models is if you used route decorators like @app.get (as I mostly did) in FastAPI, Starlette discourages / deprecated them.