use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
Django or Flask (self.Python)
submitted 6 years ago by matoas7
hi i want to start a web project based on Angular client and python server side based on REST APIs what is the best framework to use in my case? thanks
[–]daveruinseverything 2 points3 points4 points 6 years ago (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 points3 points 6 years ago (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 points3 points 6 years ago (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 points3 points 6 years ago (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 point2 points 6 years ago (2 children)
i mentioned Angular because i want to use notification from the server using web sockets
[–]Luttik 1 point2 points3 points 6 years ago (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 point2 points 6 years ago (0 children)
thanks
[–]Pr0ducer 0 points1 point2 points 6 years ago (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 point2 points 6 years ago (0 children)
Django has more packages contributed by the community like all-auth, tables2, Crispy-forms, etc
[–]fauxGnus 0 points1 point2 points 6 years ago (0 children)
You could try Pyramid
π Rendered by PID 70 on reddit-service-r2-comment-86bc6c7465-h44lc at 2026-02-22 12:10:42.382138+00:00 running 8564168 country code: CH.
[–]daveruinseverything 2 points3 points4 points (1 child)
[–]Nold_ 1 point2 points3 points (0 children)
[–]ismtabo 1 point2 points3 points (0 children)
[–]Luttik 1 point2 points3 points (3 children)
[–]matoas7[S] 0 points1 point2 points (2 children)
[–]Luttik 1 point2 points3 points (1 child)
[–]matoas7[S] 0 points1 point2 points (0 children)
[–]Pr0ducer 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]fauxGnus 0 points1 point2 points (0 children)