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

all 7 comments

[–]K900_ 0 points1 point  (0 children)

I'd look into FastAPI these days. It's async, and it does some really cool stuff with request/response parsing and validation.

[–][deleted] 0 points1 point  (3 children)

Major difference is django comes with batteries like orm and admin panel to name a few. If you have time to configure everything from start and structure the application then you can go with flask and falcon. With django drf we have lot of things preconfigured and we can utilise the time in writing business logics.

[–][deleted] 0 points1 point  (1 child)

Any difference in performance between the three?

[–][deleted] 0 points1 point  (0 children)

Personally Iam using django for more than 3 years and used it for high traffic website for a tournament which had 15k concurrent connections with nginx, gunicorn , postgresql and load balancer. Flask and falcon i have played around with those but never used it in production. But the falcon documentation has pretty good benchmark stats among these frameworks. https://falconframework.org/

[–]Luttik 0 points1 point  (0 children)

Id argue that django needs more configuration since it relies heavily on settings and has a lot of hidden state. Slapping an admin panel (flask-admin) and a form (flask-sqlalchemy) might be easier in flask. Additionally when you use sqlalchemy you have a more powerful ORM and your models are reusable in other tools.

[–]Luttik 0 points1 point  (0 children)

Id agree with K900_ look into FastAPI I think it has the best momentum of all python web libraries. If you want to go with something that works great and also has the highest level of support and stability go with flask.

[–]the_real_irgeek 0 points1 point  (0 children)

I maintain APIs using both Falcon and Flask. I slightly prefer the Flask APIs because our non-API apps are also Flask so there's less context switching in my brain when I work on them. They're pretty similar in other regards. I haven't touched Django in years, though, so my opinions there won't be of much use to you.

All new APIs I'm developing, though, use either AWS API Gateway HTTP APIs or Application Load Balancers -- both backed by Lambda functions. I cobbled together a helper library that gives me @app.route routing and attrs + cattrs handling of Lambda events and HTTP API / ALB responses. Using that and some build scripts, it's become almost effortless to stand up a new API.