List Headline Image
Updated by edureka.co on Jun 25, 2019
 REPORT
edureka.co edureka.co
Owner
5 items   1 followers   0 votes   3 views

Python Frameworks: What Are The Top 5 Frameworks In Python?

Python Programming language has many applications when it comes to implementation. Web development being one of the applications, there is a pressing need to understand which framework will serve your purpose in the best way possible. In this blog, we will understand the key features of the top 5 python frameworks.

1

Django

Django

Django is a free and open-source full-stack python framework, it includes all the necessary features by default.

It follows the DRY principle, which says don’t repeat yourselves. Django uses its ORM mappers to map objects to database tables. An ORM or object relational mapper is a code library which helps you manipulate the data from a database using the object-oriented paradigm.

The main databases that django works on are PostgreSQL, MySQL, SQLite, Oracle. It can also work with other databases using the third party drivers.

Some of the exemplary features of django web frameworks are following:

Authentication
URL routing
Template engine
ORM
Database Schema migrations
Django also follows MVC-MVT architecture

MVC-MVT architecture:

MVT is slightly different from MVC, Although Django takes care of the controller part which is the code that controls the interactions between the model and the view. And the template is HTML file mixed with Django template language.

Developer provides the model, view and the template. User then maps it to the url and then the rest is done by django to serve it to the user.

2

Web2Py

Web2Py

Web2Py is open source, scalable and a full-stack framework . It does not support python 3 and comes with its own web based IDE which also includes a separate code editor, debugger and one click deployment.

Following are the features of Web2Py framework:

It does not have any prerequisites for installation and configuration
It has the ability to run on different platforms. Example- windows, mac, linux etc.
Comes with an ability to read multiple protocols
Web2Py provides data security against vulnerabilities like cross site scripting, sql injection and other malicious attacks.
It has an error tracking mechanism through an error logging and ticketing system.
Also has role based access control
There is backward compatibility which ensures user oriented advancement without the need to lose any ties with earlier versions.

3

Flask

Flask

Flask is a micro-framework. It is lightweight and its modular design makes it easily adaptable to developer’s needs. It has a number of out of the box features listed below:

Built-in development server
A fast debugger
Integrated support for unit testing
RESTful request dispatching
Jinja2 templating
Secure cookies support
Unicode-based
WSGI compliance
Ability to plug any ORM
HTTP request handling

4

Bottle

Bottle

Bottle is a micro-framework which is originally meant for building APIs , bottle implements everything in a single source file. It has no dependencies whatsoever apart from the python standard library.

The default features include the following:

Routing
Templating
Access to form data, file uploads, cookies, headers etc.
Abstraction layer over the WSGI standard
A built-in development server that supports any other WSGI-capable HTTP server.
Bottle is perfect for building simple personal applications, prototyping and learning the organisation of web frameworks.

5

CherryPy

CherryPy

CherryPy is an open-source framework. It follows the minimalist approach in building web applications. It makes building web applications similar to writing an object oriented program.

CherryPy allows us to use any type of technology for creating templates and data access. It is still able to handle sessions, cookies, statics, file uploads and everything else a web framework typically can.

Following are some key features of CherryPy:

An HTTP WSGI compliant thread pooled web server
It has simplicity of running multiple HTTP servers at once
A flexible plugin system
Caching
Encoding
Authentication
Built-in support for profiling, coverage and testing
Ability to run on different platforms