Live data from Hacker News

Flask 2.0.0 has been merged into master

github.com

11–20 of 55 posts

Re: Flask 2.0.0 has been merged into master

#11
post #5

I have moved most of my stuff to FastAPI. It’s so much more enjoyable than flask. https://fastapi.tiangolo.com/

As casual python user I found Flask really nice for my projects

IMHO, FastAPI is more obvious and less magical than Flask. Give it a shot, its super easy to write endpoints.

Re: Flask 2.0.0 has been merged into master

#13
post #11
post #5

Earlier quoted context omitted.

As casual python user I found Flask really nice for my projects

IMHO, FastAPI is more obvious and less magical than Flask. Give it a shot, its super easy to write endpoints.

Don’t need to replace what is already obvious from use of a great project, Flask.

Re: Flask 2.0.0 has been merged into master

#14
post #6

I have moved most of my stuff to FastAPI. It’s so much more enjoyable than flask. https://fastapi.tiangolo.com/

I've moved most of my Flask projects to Express and NodeJS. Flask was just a PITA to deploy properly in a way that it could handle lots of concurrent connections without a massive memory footprint, and async in Python is a mess. The JS ecosystem has on the other hand moved to async and Promises as the standand/default way to implement things, which makes things much easier. Express middleware is also just easier to w…

> The JS ecosystem has on the other hand moved to async and Promises as the standand/default way to implement things, which makes things much easier.

Weird, none of the issues in my career as a full stack dev ever have been due to a lack of async primitives.

There are much more elegant ways of doing concurrency than Promises and coloured (async vs regular) functions, if that's the issue.

Re: Flask 2.0.0 has been merged into master

#15
post #6

I have moved most of my stuff to FastAPI. It’s so much more enjoyable than flask. https://fastapi.tiangolo.com/

I've moved most of my Flask projects to Express and NodeJS. Flask was just a PITA to deploy properly in a way that it could handle lots of concurrent connections without a massive memory footprint, and async in Python is a mess. The JS ecosystem has on the other hand moved to async and Promises as the standand/default way to implement things, which makes things much easier. Express middleware is also just easier to w…

You looked into using gevent workers? Sometimes you need to make tweaks to C-based dependencies to make them not block the event loop, but it should work fine for doing a lot of concurrency without a bunch of rewriting. Usually your bottleneck is your database anyway.

Re: Flask 2.0.0 has been merged into master

#16
post #6

Earlier quoted context omitted.

I've moved most of my Flask projects to Express and NodeJS. Flask was just a PITA to deploy properly in a way that it could handle lots of concurrent connections without a massive memory footprint, and async in Python is a mess. The JS ecosystem has on the other hand moved to async and Promises as the standand/default way to implement things, which makes things much easier. Express middleware is also just easier to w…

> Flask was just a PITA to deploy properly in a way that it could handle lots of concurrent connections without a massive memory footprint, and async in Python is a mess. That makes me concerned. Does anyone here know if FastAPI is better? How many concurrent connections could your Express app handle at once?

Yes. Night and day. I haven't got too deep into it, but FastApi allows writing async def right out of the box, super easy to set up. Uvicorn is stupid fast and easily configurable. There is also fledgeling asgi (async wsgi) support iirc.

Re: Flask 2.0.0 has been merged into master

#17
post #6

I have moved most of my stuff to FastAPI. It’s so much more enjoyable than flask. https://fastapi.tiangolo.com/

I've moved most of my Flask projects to Express and NodeJS. Flask was just a PITA to deploy properly in a way that it could handle lots of concurrent connections without a massive memory footprint, and async in Python is a mess. The JS ecosystem has on the other hand moved to async and Promises as the standand/default way to implement things, which makes things much easier. Express middleware is also just easier to w…

If you like Express and writing middleware in Express, you will love Koa. Its written by the same team that wrote Express so it will be familiar. It makes more use of async/await than Express too.

Re: Flask 2.0.0 has been merged into master

#19
post #2

In case anyone is interested in the major changes in 2.0.x: https://flask.palletsprojects.com/en/master/changes/

At the very bottom: "Add type hinting."

I love that this happens to larger libraries now. It doesn't need to be 100% complete, but it will still improve many devs' lives. I hope it will become the default for new projects and major updates.

Re: Flask 2.0.0 has been merged into master

#20

I have moved most of my stuff to FastAPI. It’s so much more enjoyable than flask. https://fastapi.tiangolo.com/

Nice, I'll have to try it out - Swagger UI has always been a pain with various add-ons in Flask, and it looks like it's built-in and easy with FastAPI.

Flask is still my go-to Python web framework. Ten years on, and I haven't stopped loving how small, elegant, and flexible it is. It set the bar for many other similar projects.

Post reply on HN