What are web development frameworks in python

Python has a wide range of applications in web development. In view of the various frameworks, how to choose will become a problem for developers. To this end, I hereby conduct a rough analysis of the more common frameworks in terms of performance, experience and application.

1 Django

Django is an open source web application framework, written in Python. The framework mode of MTV is adopted, namely model M, template T and view V. It was originally developed to manage some news content-based websites under the Lawrence Publishing Group, which is CMS (Content Management System) software. Compared with other frameworks, Django has a unique feature. It supports orm and encapsulates the operation of the database into python, which is a better feature for applications that need to apply multiple databases. However, this feature has been completed by other libraries, sqlalchemy.

2 Flask

Flask is a lightweight web application framework written in Python. Its WSGI toolbox uses Werkzeug, and its template engine uses Jinja2. Flask uses BSD authorization.

Flask is also called "microframework" because it uses a simple core and uses extensions to add other functions. Flask does not have a default database or form verification tool.

Flask is very light, and a simple website can be developed at a very low cost. Very suitable for beginners to learn. After learning the Flask framework, you can consider learning the use of plug-ins. For example, use WTForm + Flask-WTForm to verify form data, and SQLAlchemy + Flask-SQLAlchemy to control your database.

3 Tornado

Tornado is an open source version of web server software. Tornado is obviously different from current mainstream web server frameworks (including most Python frameworks): it is a non-blocking server, and it is quite fast.

Thanks to its non-blocking method and the use of epoll, Tornado can handle thousands of connections per second, so Tornado is an ideal framework for real-time web services. However, compared with many frameworks, Tornado has been left behind, and Django has surpassed it, not to mention other frameworks. It can only be said that the performance of Tornado developed with pure python is still not comparable to the performance of other frameworks developed with cython. compared to.

4 web.py

web.py is a Python web framework, it is simple and powerful. web.py is public and there are no restrictions on what it is used for. And quite small, it should belong to a lightweight web framework. But this does not affect the power of web.py, and it is very simple and straightforward to use. In practical applications, web.py is more of academic value, because you can see more of the bottom layer of web applications, which you cannot learn from today’s "very well abstracted" web frameworks :)

5 Aiohttp

High-performance asynchronous web framework, both client-side and server-side, and also supports web-socket

6 Sanic

Similar to flask and supports asynchronous

7 Vibora

Aims to be the fastest python web framework. The high performance of vibora relies on the uvloop asynchronous framework implemented by cython and the http_parser implemented by cython, plus some web components built by cython, such as templates, user-routes, etc. It is still in the testing stage.

8 Bottle

Bottle is a simple and efficient WSGI-compliant micro python web framework. I say micro because it has only one file, and it does not depend on any third-party modules except the Python standard library.

9 Falcon

Falcon is a high-performance Python framework for building cloud APIs. It encourages the use of the REST architecture style and does the most with the least effort possible.

10 weppy

A full-stack web framework with better performance than flask.

Knowledge point supplement:

Misunderstanding of frame selection

With regard to the choice of framework, many people easily fall into the following two misunderstandings without realizing it:

  1. Which framework is best-there is no best framework in the world, only the framework that suits you best and your team best. The choice of programming language is also a reason. If your team is most familiar with Python, use Python. If you are most familiar with Ruby, then use Ruby. Programming languages and frameworks are just tools. You can do more, faster, better, and less expensive. Finishing is a good thing.

  2. Too much attention to performance-in fact, most people do not need to care too much about the performance of the framework, because the website you develop is a small website at all. There are not many websites with 10,000 IP addresses, and 100,000 is even more so. Seldom. It doesn't make much sense to talk about performance before a certain amount of visits, because your CPU and memory are always idle. Moreover, languages and frameworks are generally not performance bottlenecks. Performance problems most often occur in database access and file reading and writing. PHP's Zend Framework is notoriously slow, but Zend Framework also has big sites, such as digg.com; Ruby and Rails, which are often said to have performance problems, can still develop twitter? Moreover, the current hardware and bandwidth costs are actually very low. Especially with the cloud computing platform, the labor cost is the most expensive. Without tens of thousands of IPs, you don’t have to worry too much about performance issues. If the traffic goes up, spend some money to buy something. The server space is good, and the performance problem can be solved quickly and easily.

Note: Some netizens questioned me that "Quora is developed with Pylons" is not objective. I want to point out that a certain website A mentioned here is developed with B, but that A is mainly or partly developed by B , Everyone should stop entangled with A and C.

So far, this article on which web development frameworks in python are introduced is here. For more related python web development frameworks, please search for previous articles of ZaLou.Cn or continue to browse related articles below. Hope you will get more Support ZaLou.Cn!

Recommended Posts

What are web development frameworks in python
​What are the numbers in Python?
What are python class attributes
What conditions are needed for infinite loop in Python
What is introspection in python
What is object-oriented in python
What are the ways to open files in python
What is list comprehension in python
What does rc1 mean in python
Use of numpy in Python development
What does def in python do
There are several keywords in Python
What does np do in python
What are the required parameters of python
A complete guide to Python web development
What is an anonymous function in Python
What are the advantages of python language
What is the prospect of python development
What is a sequence table in Python
What is the function of adb in python
Functions in python
What does the tab key in python mean
Python data visualization: who are the big names in Python?
Python web crawler (practice)
03. Operators in Python entry
What can Python do
Join function in Python
12. Network Programming in Python3
print statement in python
python development [first article]
Web Scraping with Python
Concurrent requests in Python
Install python in Ubuntu
Context management in Python
Arithmetic operators in python
Write gui in python
MongoDB usage in Python
Str string in Python
Computational Geometry in Python