Live data from Hacker News

Flask 1.0 Released

palletsprojects.com

11–20 of 184 posts

Re: Flask 1.0 Released

#11
post #6

This is epic. In theory now from V1 onwards it should be easier to convince people at big serious corps to use Flask as it cuts down a lot of Django bloat especially for smaller applications, microservices and other nimble backends.

Hopefully! There's a bad attitude I've noticed about Flask, people don't take it seriously and treat it like a learning tool or a library for quick and dirty hack projects. All because it's simple to learn and free of bullshit and Just Works™. Should lead to the opposite attitude, but nope. People apparently enjoy extra complexity.

Re: Flask 1.0 Released

#12
Flask is an absolutely amazing experience for small-mid sized projects. You have to hand roll and pull in things for bigger projects, but I think it's great when you want "just what I need and nothing extra".

I'd be curious to see some sort of flask "bundles" that would allow it to make more sense for large-scale projects.

Re: Flask 1.0 Released

#13

I understand that Flask has become popular because it is easy to learn, but my experience is that as your knowledge progresses it just keeps getting in your way. I particularly dislike some design choices which look like afterthought hacks, such as global variables for current request and using abort() functions instead of raising exceptions directly. EDIT: To avoid hollow naysaying, here are some alternatives to Fla…

The real value of Flask is that it makes you appreciate what Django does by default.

When I first started learning Python / web frameworks, I went with Flask because it was smaller and "simpler". As my project grew however, I had to organize it. I was basically imitating what Django gives you by default, though less cleanly.

Re: Flask 1.0 Released

#14

I understand that Flask has become popular because it is easy to learn, but my experience is that as your knowledge progresses it just keeps getting in your way. I particularly dislike some design choices which look like afterthought hacks, such as global variables for current request and using abort() functions instead of raising exceptions directly. EDIT: To avoid hollow naysaying, here are some alternatives to Fla…

I agree. I particularly like Go's web ecosystem. A web server is just a function, and that function is often a composition of other functions (for example, a tree of router functions and then a handler for each route). By contrast, it seems like Flask goes to great lengths to obscure such a simple concept (decorators for routes, global variables for state and resource management, etc).

Re: Flask 1.0 Released

#15
post #3

Never even realised it wasn't 1.0, maybe I should pay attention to version numbers. Changelog looks good! I've never understood logging in Flask or how to do it in a sane way for a simple app while using uWSGI, so I'm glad that has some improvements. I don't remember my exact issues but I couldn't get configuration from a text file to work and for some reason configuring it in-code wouldn't work either. I don't under…

My processes always log to stdout. stdout + supervisor + rsyslog = fun and profit.

You can also log directly to rsyslog with python logger.

Re: Flask 1.0 Released

#16

I understand that Flask has become popular because it is easy to learn, but my experience is that as your knowledge progresses it just keeps getting in your way. I particularly dislike some design choices which look like afterthought hacks, such as global variables for current request and using abort() functions instead of raising exceptions directly. EDIT: To avoid hollow naysaying, here are some alternatives to Fla…

Pyramid is great, lacks the problems (magic) you mentioned, and is now what pypi.org is built on: https://docs.pylonsproject.org/projects/pyramid/en/latest/in...

I’ve used it off and on since 2010 (as Pylons) and have been happy with it.

Re: Flask 1.0 Released

#17

I understand that Flask has become popular because it is easy to learn, but my experience is that as your knowledge progresses it just keeps getting in your way. I particularly dislike some design choices which look like afterthought hacks, such as global variables for current request and using abort() functions instead of raising exceptions directly. EDIT: To avoid hollow naysaying, here are some alternatives to Fla…

>global variables for current request

Not really global variables. I would analogize it to dynamic variables from Lisp, which are a feature I wish every language had. I strongly disagree it's a hack or gets in the way. Having access to the request from anywhere without explicitly passing it around is really useful.

Re: Flask 1.0 Released

#18
post #13

I understand that Flask has become popular because it is easy to learn, but my experience is that as your knowledge progresses it just keeps getting in your way. I particularly dislike some design choices which look like afterthought hacks, such as global variables for current request and using abort() functions instead of raising exceptions directly. EDIT: To avoid hollow naysaying, here are some alternatives to Fla…

The real value of Flask is that it makes you appreciate what Django does by default. When I first started learning Python / web frameworks, I went with Flask because it was smaller and "simpler". As my project grew however, I had to organize it. I was basically imitating what Django gives you by default, though less cleanly.

+1 You nailed it, this mirrors my experience.

Re: Flask 1.0 Released

#19
post #13

I understand that Flask has become popular because it is easy to learn, but my experience is that as your knowledge progresses it just keeps getting in your way. I particularly dislike some design choices which look like afterthought hacks, such as global variables for current request and using abort() functions instead of raising exceptions directly. EDIT: To avoid hollow naysaying, here are some alternatives to Fla…

The real value of Flask is that it makes you appreciate what Django does by default. When I first started learning Python / web frameworks, I went with Flask because it was smaller and "simpler". As my project grew however, I had to organize it. I was basically imitating what Django gives you by default, though less cleanly.

"The real value of Flask is that it makes you appreciate what Django does by default"

I have exactly the opposite experience: Flask is nicer than Django; SQLAlchemy is better than Django ORM. Love a bit of Flask.

Re: Flask 1.0 Released

#20
post #13

I understand that Flask has become popular because it is easy to learn, but my experience is that as your knowledge progresses it just keeps getting in your way. I particularly dislike some design choices which look like afterthought hacks, such as global variables for current request and using abort() functions instead of raising exceptions directly. EDIT: To avoid hollow naysaying, here are some alternatives to Fla…

The real value of Flask is that it makes you appreciate what Django does by default. When I first started learning Python / web frameworks, I went with Flask because it was smaller and "simpler". As my project grew however, I had to organize it. I was basically imitating what Django gives you by default, though less cleanly.

this only applies if your project can be organised within Django's requirements though right? I use Flask and Django a bit but it usually depends on how "cookie cutter" the project scope is
Post reply on HN