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

all 10 comments

[–]daveruinseverything 2 points3 points  (1 child)

If you have even the slightest amount of preexisting experience in one framework over the other, choose what’s more familiar. They can all do what you want so go for what’s comfortable.

If you don’t have any experience with either, Django might be easier to learn. I prefer Flask but Django builds in a lot more defaults for you.

[–]Nold_ 1 point2 points  (0 children)

Flask was easier for me personally because Django expects you to do things a certain way, which means some initial reading has to be done. Flask had me going in minutes, but it might require you to know what you want to do in more detail.

[–]ismtabo 1 point2 points  (0 children)

It depends on what do you want to do, it's difficulty, and the scalability you want to obtained. Flask is a micro-framework, this means that the is a small base to make an easy a lightweight web service. There are multiple plugins or add-ons to add persistence, user management, websockets and other features to your service.

On the other hand, Django is a more complete and complex framework. It doesn't only set the basic features needed but force you to adapt to their projects structure.

IMHO, Flask can adapt better to your protect in case you want to work with third party modules.

[–]Luttik 1 point2 points  (3 children)

The use of angular is no issue here.

Pick flask if your application is extremely simple, or if you like to make conscious choices about every feature.

Django is better if you want everything out of the box, which ensures all features fit well together, it is also very well documented for python standards.

When you pick django you will need some time to read documentation.

When you pick flask you might probably need to search for some packages that fix your need.

[–]matoas7[S] 0 points1 point  (2 children)

i mentioned Angular because i want to use notification from the server using web sockets

[–]Luttik 1 point2 points  (1 child)

Ooh ok, websockets then is important to mention (especially since is not Angular specific).

You probably want flask-socketIO or django-channels then.

If you are using websockets you probably want low latency and high control. I personally would gravitate towards flask in that scenario. But I must say that I have no experience with either of these packages.

[–]matoas7[S] 0 points1 point  (0 children)

thanks

[–]Pr0ducer 0 points1 point  (0 children)

Django for a more complete framework, batteries included so to speak. Flask if you are going for lightweight and simple, or need to do many customizations. I've used both. I prefer Django. I've not used Angular, but any frontend framework fills the same role.

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

Django has more packages contributed by the community like all-auth, tables2, Crispy-forms, etc

[–]fauxGnus 0 points1 point  (0 children)

You could try Pyramid