librelist archives

« back to archive

Thread Locals in Flask

Thread Locals in Flask

From:
Raj Nathani
Date:
2013-02-17 @ 21:06
My team and me are working for a project for a client where the 
applicationto be made is to scale well.
We're trying to make a decision between flask and django. For past 
projectsI've had amazing experiences with flask, its small and lightweight
but at thesame time very powerful. The concept of Bring Your Own Batteries
is somethingwhich my team and me work well with.
Our client has requirements pretty different. He wants to beable to have 
something shipped which will scale very well. Here is where somemembers of
my team including me are kind of doubtful of flask. In the 
flaskdocumentation it clearly states that flask is not built for large 
applications.If this is the case then django would most likely be chosen 
for the project. Any thoughtsout here? By the way, the client has 
estimated his infrastructure to includemany small to medium servers behind
a load balancer (we plan to run uwsgi on the individualservers regardless 
of flask or django), would this make a difference?
I'm aware of the non-technical nature of this question for which I 
apologize. Many membersof my team and me are keen on working with flask as
its a framework which we unanimouslyfavour, although our productivity and 
comfort isn't as important as our client's requirements.
Thankyou,Raj 		 	   		  

Re: [flask] Thread Locals in Flask

From:
John Nyctalop
Date:
2013-02-19 @ 13:08
Interesting question, I would love to get some comments from one of the
heavyweight Flask users (Disqus? Fireteam? who else?).

  Nyck


On Sun, Feb 17, 2013 at 10:06 PM, Raj Nathani <raj_n19@hotmail.com> wrote:

> My team and me are working for a project for a client where the application
> to be made is to scale well.
>
> We're trying to make a decision between flask and django. For past projects
> I've had amazing experiences with flask, its small and lightweight but at
> the
> same time very powerful. The concept of *Bring Your Own Batteries* is
> something
> which my team and me work well with.
>
> Our client has requirements pretty different. He wants to be
> able to have something shipped which will scale very well. Here is where
> some
> members of my team including me are kind of doubtful of flask. In the flask
> documentation it clearly states that flask is not built for large
> applications.
> If this is the case then django would most likely be chosen for the
> project. Any thoughts
> out here? By the way, the client has estimated his infrastructure to
> include
> many small to medium servers behind a load balancer (we plan to run uwsgi
> on the individual
> servers regardless of flask or django), would this make a difference?
>
> I'm aware of the non-technical nature of this question for which I
> apologize. Many members
> of my team and me are keen on working with flask as its a framework which
> we unanimously
> favour, although our productivity and comfort isn't as important as our
> client's requirements.
>
> Thankyou,
> Raj
>

Re: [flask] Thread Locals in Flask

From:
Owein Reese
Date:
2013-02-22 @ 02:46
Here's the thing, both scale. It's how you scale that's important. Django
has a larger and richer ecosystem of addons. In any heavyweight framework
such as Django you're eventually going to have to swap some components in
order to scale. Flask, because it doesn't force so many decisions upon you
like an ORM might seem like the better choice but it isn't.  It's just
another choice.

Of the applications I've worked on scaling issues have been vastly
different. Neither Flask or Django by themselves would have been perfect.
Wed have switched out several caching libraries if we had chosen either and
made just as many headaches regardless. What you should ask your client is
what they feel more comfortable with. Do they feel more comfortable with a
few tried and true libraries like SQLAlchemy or are they more concerned
with having a larger body of plug-n-play tools?

This isn't the answer you want but I can tell you your infrastructure
choices will have more impact than framework in the long run. Eventually it
all gets tweaked.
On Feb 21, 2013 9:23 PM, "John Nyctalop" <nyctalop@gmail.com> wrote:

> Interesting question, I would love to get some comments from one of the
> heavyweight Flask users (Disqus? Fireteam? who else?).
>
>   Nyck
>
>
> On Sun, Feb 17, 2013 at 10:06 PM, Raj Nathani <raj_n19@hotmail.com> wrote:
>
>> My team and me are working for a project for a client where the
>> application
>> to be made is to scale well.
>>
>> We're trying to make a decision between flask and django. For past
>> projects
>> I've had amazing experiences with flask, its small and lightweight but at
>> the
>> same time very powerful. The concept of *Bring Your Own Batteries* is
>> something
>> which my team and me work well with.
>>
>> Our client has requirements pretty different. He wants to be
>> able to have something shipped which will scale very well. Here is where
>> some
>> members of my team including me are kind of doubtful of flask. In the
>> flask
>> documentation it clearly states that flask is not built for large
>> applications.
>> If this is the case then django would most likely be chosen for the
>> project. Any thoughts
>> out here? By the way, the client has estimated his infrastructure to
>> include
>> many small to medium servers behind a load balancer (we plan to run uwsgi
>> on the individual
>> servers regardless of flask or django), would this make a difference?
>>
>> I'm aware of the non-technical nature of this question for which I
>> apologize. Many members
>> of my team and me are keen on working with flask as its a framework which
>> we unanimously
>> favour, although our productivity and comfort isn't as important as our
>> client's requirements.
>>
>> Thankyou,
>> Raj
>>
>
>

Re: [flask] Thread Locals in Flask

From:
Trey Long
Date:
2013-02-22 @ 14:04
I have to agree with Owein here, I've done two fairly large systems on top
of Flask and many many more on Django. They are both perfectly 
serviceable. My primary issue with Django is that the batteries included 
tag-line is wrong, it should be more like, "batteries welded in."

That being said, Flask's main problem when growing large is project 
organization. If you're proficient in Python though at the end of the day 
Flask is a lot more transparent. There isn't any magic involved, you 
import your app and run it. For my team who are all expert Python people 
Flask is more liberating because things make a lot more sense. Django 
abstracts that more and instead of a Python project you have a Django 
project with it's own way of initializing and running.

Some people assume that since Flask is a micro-framework you would 
naturally grow into Django with a large project because Django is fully 
featured. We found this to be the opposite. Django was great because the 
training wheels were on, but Flask is better now.

You should choose the project in which you believe you could solve the 
problem the best and quickest way with. Remember, Django's ORM isn't 
really separable from the core.

Trey


On Feb 21, 2013, at 9:46 PM, Owein Reese <owreese@gmail.com> wrote:

> Here's the thing, both scale. It's how you scale that's important. 
Django has a larger and richer ecosystem of addons. In any heavyweight 
framework such as Django you're eventually going to have to swap some 
components in order to scale. Flask, because it doesn't force so many 
decisions upon you like an ORM might seem like the better choice but it 
isn't.  It's just another choice.
> 
> Of the applications I've worked on scaling issues have been vastly 
different. Neither Flask or Django by themselves would have been perfect. 
Wed have switched out several caching libraries if we had chosen either 
and made just as many headaches regardless. What you should ask your 
client is what they feel more comfortable with. Do they feel more 
comfortable with a few tried and true libraries like SQLAlchemy or are 
they more concerned with having a larger body of plug-n-play tools?
> 
> This isn't the answer you want but I can tell you your infrastructure 
choices will have more impact than framework in the long run. Eventually 
it all gets tweaked.
> 
> On Feb 21, 2013 9:23 PM, "John Nyctalop" <nyctalop@gmail.com> wrote:
> Interesting question, I would love to get some comments from one of the 
heavyweight Flask users (Disqus? Fireteam? who else?).
> 
>   Nyck
> 
> 
> On Sun, Feb 17, 2013 at 10:06 PM, Raj Nathani <raj_n19@hotmail.com> wrote:
> My team and me are working for a project for a client where the application
> to be made is to scale well.
> 
> We're trying to make a decision between flask and django. For past projects
> I've had amazing experiences with flask, its small and lightweight but at the
> same time very powerful. The concept of Bring Your Own Batteries is something
> which my team and me work well with.
> 
> Our client has requirements pretty different. He wants to be
> able to have something shipped which will scale very well. Here is where some
> members of my team including me are kind of doubtful of flask. In the flask
> documentation it clearly states that flask is not built for large applications.
> If this is the case then django would most likely be chosen for the 
project. Any thoughts
> out here? By the way, the client has estimated his infrastructure to include
> many small to medium servers behind a load balancer (we plan to run 
uwsgi on the individual
> servers regardless of flask or django), would this make a difference?
> 
> I'm aware of the non-technical nature of this question for which I 
apologize. Many members
> of my team and me are keen on working with flask as its a framework 
which we unanimously
> favour, although our productivity and comfort isn't as important as our 
client's requirements.
> 
> Thankyou,
> Raj
> 

Re: [flask] Thread Locals in Flask

From:
David Brenneman
Date:
2013-02-22 @ 21:34
Well put Trey.

David Brenneman
http://davidbrenneman.com

(Sent from my mobile device, please excuse brevity and tyops.)

On Feb 22, 2013, at 6:04 AM, Trey Long <trey@ktrl.com> wrote:

> I have to agree with Owein here, I've done two fairly large systems on 
top of Flask and many many more on Django. They are both perfectly 
serviceable. My primary issue with Django is that the batteries included 
tag-line is wrong, it should be more like, "batteries welded in."
> 
> That being said, Flask's main problem when growing large is project 
organization. If you're proficient in Python though at the end of the day 
Flask is a lot more transparent. There isn't any magic involved, you 
import your app and run it. For my team who are all expert Python people 
Flask is more liberating because things make a lot more sense. Django 
abstracts that more and instead of a Python project you have a Django 
project with it's own way of initializing and running.
> 
> Some people assume that since Flask is a micro-framework you would 
naturally grow into Django with a large project because Django is fully 
featured. We found this to be the opposite. Django was great because the 
training wheels were on, but Flask is better now.
> 
> You should choose the project in which you believe you could solve the 
problem the best and quickest way with. Remember, Django's ORM isn't 
really separable from the core.
> 
> Trey
> 
> 
> On Feb 21, 2013, at 9:46 PM, Owein Reese <owreese@gmail.com> wrote:
> 
>> Here's the thing, both scale. It's how you scale that's important. 
Django has a larger and richer ecosystem of addons. In any heavyweight 
framework such as Django you're eventually going to have to swap some 
components in order to scale. Flask, because it doesn't force so many 
decisions upon you like an ORM might seem like the better choice but it 
isn't.  It's just another choice.
>> 
>> Of the applications I've worked on scaling issues have been vastly 
different. Neither Flask or Django by themselves would have been perfect. 
Wed have switched out several caching libraries if we had chosen either 
and made just as many headaches regardless. What you should ask your 
client is what they feel more comfortable with. Do they feel more 
comfortable with a few tried and true libraries like SQLAlchemy or are 
they more concerned with having a larger body of plug-n-play tools?
>> 
>> This isn't the answer you want but I can tell you your infrastructure 
choices will have more impact than framework in the long run. Eventually 
it all gets tweaked.
>> 
>> On Feb 21, 2013 9:23 PM, "John Nyctalop" <nyctalop@gmail.com> wrote:
>>> Interesting question, I would love to get some comments from one of 
the heavyweight Flask users (Disqus? Fireteam? who else?).
>>> 
>>>   Nyck
>>> 
>>> 
>>> On Sun, Feb 17, 2013 at 10:06 PM, Raj Nathani <raj_n19@hotmail.com> wrote:
>>>> My team and me are working for a project for a client where the application
>>>> to be made is to scale well.
>>>> 
>>>> We're trying to make a decision between flask and django. For past projects
>>>> I've had amazing experiences with flask, its small and lightweight but at the
>>>> same time very powerful. The concept of Bring Your Own Batteries is something
>>>> which my team and me work well with.
>>>> 
>>>> Our client has requirements pretty different. He wants to be
>>>> able to have something shipped which will scale very well. Here is where some
>>>> members of my team including me are kind of doubtful of flask. In the flask
>>>> documentation it clearly states that flask is not built for large 
applications.
>>>> If this is the case then django would most likely be chosen for the 
project. Any thoughts
>>>> out here? By the way, the client has estimated his infrastructure to include
>>>> many small to medium servers behind a load balancer (we plan to run 
uwsgi on the individual
>>>> servers regardless of flask or django), would this make a difference?
>>>> 
>>>> I'm aware of the non-technical nature of this question for which I 
apologize. Many members
>>>> of my team and me are keen on working with flask as its a framework 
which we unanimously
>>>> favour, although our productivity and comfort isn't as important as 
our client's requirements.
>>>> 
>>>> Thankyou,
>>>> Raj
>>> 
> 

Re: [flask] Thread Locals in Flask

From:
樱宝宝
Date:
2013-02-23 @ 09:09
I my opinion,no matter flask or django,the most important thing is which 
framework is your team familiar with.Now the server resources are so cheap
because we have amazon,you know,programmers are much much more expensive 
than machines.So the most important thing is how to use programmers 
effectively.




------------------ Original ------------------
From:  "Trey Long"<trey@ktrl.com>;
Date:  Feb 22, 2013
To:  "flask"<flask@librelist.com>; 

Subject:  Re: [flask] Thread Locals in Flask



I have to agree with Owein here, I've done two fairly large systems on top
of Flask and many many more on Django. They are both perfectly 
serviceable. My primary issue with Django is that the batteries included 
tag-line is wrong, it should be more like, "batteries welded in."

That being said, Flask's main problem when growing large is project 
organization. If you're proficient in Python though at the end of the day 
Flask is a lot more transparent. There isn't any magic involved, you 
import your app and run it. For my team who are all expert Python people 
Flask is more liberating because things make a lot more sense. Django 
abstracts that more and instead of a Python project you have a Django 
project with it's own way of initializing and running.


Some people assume that since Flask is a micro-framework you would 
naturally grow into Django with a large project because Django is fully 
featured. We found this to be the opposite. Django was great because the 
training wheels were on, but Flask is better now.


You should choose the project in which you believe you could solve the 
problem the best and quickest way with. Remember, Django's ORM isn't 
really separable from the core.


Trey



On Feb 21, 2013, at 9:46 PM, Owein Reese <owreese@gmail.com> wrote:


Here's the thing, both scale. It's how you scale that's important. Django 
has a larger and richer ecosystem of addons. In any heavyweight framework 
such as Django you're eventually going to have to swap some components in 
order to scale. Flask, because it doesn't force so many   decisions upon 
you like an ORM might seem like the better choice but it isn't.  It's just
another choice. 

Of the applications I've worked on scaling issues have been vastly 
different. Neither Flask or Django by themselves would have been perfect. 
Wed have switched out several caching libraries if we had chosen either 
and made just as many headaches regardless. What you should ask your 
client is what they feel more comfortable with. Do they feel more 
comfortable with a few tried and true libraries like SQLAlchemy or are 
they more concerned with having a larger body of plug-n-play tools?

This isn't the answer you want but I can tell you your infrastructure 
choices will have more impact than framework in the long run. Eventually 
it all gets tweaked. 
 On Feb 21, 2013 9:23 PM, "John Nyctalop" <nyctalop@gmail.com> wrote:
 Interesting question, I would love to get some comments from one of the 
heavyweight Flask users (Disqus? Fireteam? who else?).

  Nyck


 On Sun, Feb 17, 2013 at 10:06 PM, Raj Nathani <raj_n19@hotmail.com> wrote:
 My team and me are working for a project for a client where the 
applicationto be made is to scale well.


We're trying to make a decision between flask and django. For past projects
 I've had amazing experiences with flask, its small and lightweight but at the
same time very powerful. The concept of Bring Your Own Batteries is something
 which my team and me work well with.


Our client has requirements pretty different. He wants to be
 able to have something shipped which will scale very well. Here is where some
members of my team including me are kind of doubtful of flask. In the flask
documentation it clearly states that flask is not built for large applications.
 If this is the case then django would most likely be chosen for the 
project. Any thoughts
out here? By the way, the client has estimated his infrastructure to include
 many small to medium servers behind a load balancer (we plan to run uwsgi
on the individual
servers regardless of flask or django), would this make a difference?


I'm aware of the non-technical nature of this question for which I 
apologize. Many members
 of my team and me are keen on working with flask as its a framework which
we unanimously
favour, although our productivity and comfort isn't as important as our 
client's requirements.

 
Thankyou,
Raj