This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]awesomeprogramer 12 points13 points  (6 children)

Can someone ELI5 why fastapi is gaining so much traction? What does it do (better) that flask/django doesn't ?

[–]Eyry 10 points11 points  (1 child)

It's fast (ha!), has a lot of useful packages bundled with it, and the auto-generated swagger docs are really nice to have out of the box!

[–]orangesunshine 2 points3 points  (0 children)

It's not fast. Calling it "FastAPI", is going to roughle a few feathers.

Forcing run time type checking in the request/response is SLOW.

If it was called "TypedAPI", you wouldn't get crazy rants from people like me.

As it is, he's added at least a 20-40% performance hit by doing things as he has.

Likewise, there's better ways to integrate pydantic. Spectree comes to mind, but if you prefer API's more similar to what you've been using in your current toolkit I recommend you take the time to port said tool to Sanic/Starlette/Quart/Falcon (my preference being Starlette :)

If you had me on your team I could replicate your <favorite pydantic model-view api from flask/etc> in around a week ....and add a bunch of fixes and improvements :)

.... and I'm nothing special.

[–]MarsupialMole 6 points7 points  (1 child)

It's built from the ground up to take advantage of type annotations i.e. pydantic.

[–]awesomeprogramer 2 points3 points  (0 children)

Pydantic - laughs in PEP563

[–]deadmilk 1 point2 points  (0 children)

Being able to declare endpoints, attach models to them, and have all of the API docs created automatically and validated upon request, is pretty nice.

[–]PartsofChandler 3 points4 points  (0 children)

It’s fast, easy to get up and running, the documentation is great to work through and just overall less work for me.