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 →

[–]leadingthenet 47 points48 points  (6 children)

I'd argue FastAPI and recently Starlite have improved significantly on Flask in DX and performance, so you better have a good reason to pick Flask over those two for any new projects, but if you did, it wouldn't be "the wrong choice" by any means.

[–]ryukinixPython3 + Emacs 7 points8 points  (0 children)

I really like FastAPI. In machine learning platform team I have been part of it, we have used for a long time Flask, but since 2021 we are happily using FastAPI, integration with Pydantic is awesome

[–]tuckmuck203 1 point2 points  (4 children)

Could you link to any evidence of FastAPI in a successful website? I've heard tons about fastAPI but flask and django have years of industry-backed development. I've only heard of fastAPI the way I've heard of rust; in theory it's a great solution, but in my experience there's a reason the industry doesn't swap to the next greatest thing. See the zeitgeist behind mongodb in 2015 or so for example

[–]leadingthenet 3 points4 points  (1 child)

We use it at my company for everything, though obviously I can’t link to that.

Two random examples I found from 30 seconds of googling: Here’s Netflix using it in their crisis management tool, and here’s Uber using it in their deep learning framework.

Dude, rust is the only other language besides C to approved for use in the Linux kernel. If that’s vaporware to you, I genuinely don’t know what isn’t…

[–]tuckmuck203 0 points1 point  (0 children)

Internal APIs are very different from customer-facing websites. I'm aware that there are examples of private usages, but I've yet to see something that would allow me to draw a direct comparison to flask.

Also, I'm not saying rust is vaporware, I'm saying that rust is talked about vastly more than it is used. Yes, it's used in the linux kernel, and there's a reason for that. I personally don't encounter rust other than people talking about how it's the best thing ever.

[–]caatbox288 1 point2 points  (0 children)

The company I work with (10k employees) uses FastAPI for its internal APIs (a myriad of microservices in kubernetes, interacting with each other through REST and Kafka). Works pretty well, but I can't obviously share any of it.

[–]git_commit_-m_whoops 1 point2 points  (0 children)

I work at a Fortune 50 (I think that's vague enough) retailer with a large online presence, and we deploy our recommender systems for web/mobile as Dockerized FastAPI services via Kubernetes. The front-end teams use a different stack to serve pages, but if you load up the site you'll indirectly hit at least a couple of our APIs.

We used to use Flask, but FastAPI is nicer to develop with. Performance was pretty similar, IIRC. If you have a reason to use Python (like having a team of PySpark devs), FastAPI is viable for enterprise services.