Python’s framework, a comparative view.

Dec 10 2014

If we talk about frameworks of python, we will be discussing only three

  1. Pyramid
  2. Flask
  3. Django

Introduction to frameworks

Django have “Batteries
included” feature, “Batteries included means” this framework includes
all basic tools included within the framework.

Django has templating, forms, routing, authentication, basic
database administration and many more. Django’s first release was in
2006. Pyramid includes routing and authentication, but templating
and requires external libraries for database administration. Pyramid
is actually an enhancement of 
Pylon project, which
was introduced in 2005 and eventually it is named “
Pyramid“. Flask is
“micro framework” primarily aimed for the simpler applications.
Flask is the youngest framework of python, started in the middle of


Pyramid is best for:-

  • Developers
    working on API projects

  • Prototyping
    a concept
  • Developing
    large web applications, such as a CMS

Flask is best for:-

  • Developers
    who care about best practices

  • Developers
    who want to prototype something quickly
  • Developers
    who need a standalone app


Django is best for:-

  • Developers
    who aim to include all the batteries a web application will need.

  • Developers
    who wants to use ORM, templating, routing, authentication, database
    administration and bootstrapping on the go


Django and Pyramid both frameworks
have the bootstrapping tools, the bootstrapping tool means we don’t
need to write codes of views, models and controllers. Using
bootstrapping tools makes easier to generate the skeleton of the
target audience is not trying to build large 
MVC application.
Pyramid uses “pcreate” to for bootstrapping and Django uses
“django-admin” for templating

ORM (Object
relational mapping)

to Wikipedia ORM, is programming technique to convert the
incompatible type system in 
object oriented
Django and Pyramid both supports ORM, because of using ORM we don’t
need to fight with the queries to get the data as object in our
code. ORM is not supported by Flask.


On stackoverflow there
are 85.6k questions asked in connection with 
Django and
If we talk about 
Pyramid the number
of questions asked are only 1.4k and 471 followers. If you talk
about Flask the number of question asked are 6.1k and 1.7k follower
of this framework. The number of questions and number of followers
shows the popularity of the framework and number of users who use
these frameworks.


to Ryan Brown one of the blogger says, after comparing these three
frameworks that “
is the most flexible of the three

it can be used for small application as well as for big applications
One of the most common complaints is that there are so many options
available with the pyramid to start a new project. Django is the
most popular framework of Python. List of sites that uses Django
is quite big like Pinterest, Instagram and Bit bucket. Flask is
great for Developers who want to develop small and very fast
development of websites on python platform.