Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the 12 most popular Python web frameworks at present

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)05/31 Report--

Today, I will talk to you about what the 12 most popular Python web frameworks are, which many people may not know. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.

As a glue language, Python is very popular with the advent of the AI era. There are many directions of its development, such as: crawler, data analysis, automated testing, artificial intelligence, operation and maintenance and web development and so on.

Python programmers have many good choices to create Web applications and API;Django,Weppy,Bottle and Flask to lead the trend.

If you are developing a Web application and have chosen to use Python as the language to build it, this is a wise choice. Python development maturity, powerful library and a wide range of practical applications make it necessary for Web development.

In fact, the development of web by Python may not be so popular at home, but it is developing rapidly abroad. Some well-known domestic websites, such as Zhihu, NetEase and Douban, are all developed with Python; abroad, there are Quora (social Q & A site), Google, Pinterest (photo social sharing site).

So, let's share 12 famous Python web frameworks today.

1.Django

Django is an open source Web application framework written by Python that supports many database engines that make Web development rapid and extensible, and will be constantly updated to match the latest version of Python. If you are novice programmers, you can start with this framework.

The main things that Django is praised are:

The perfect documentation, the success of Django, is due in large part to Django's near-perfect official documentation.

2, a full set of solutions, Django provides a full set of solutions, basic what you want, and all Django made by yourself, the development of website tools Django are basically done for you, so the development efficiency is needless to say, if there is a problem, it is easy to find, not in your code in the source code of Django.

3, powerful URL routing configuration, Django allows you to design a very elegant URL, in Django you can basically say goodbye to the ugly GET parameters.

4, self-management background, admin interface is an eye-catching contrib in Django, so that you hardly need to write a single line of code to have a complete background management interface.

5, the system is tightly coupled, if you think a built-in function of Django is not very good, it is difficult to replace it with a favorite third-party library, such as ORM and Template. It's almost impossible to use SQLAlchemy or Mako in Django, and even with some patches, it will make you feel very uncomfortable.

6, Template function is weak, can not insert Python code, to write more complex logic needs to use Python to achieve Tag or Filter.

Django is a large and comprehensive direction, focusing on efficient development, it is best known for its fully automated management background: as long as the use of ORM, do a simple object definition, it can automatically generate database structure, as well as full-function management background.

2.CubicWeb

CubicWeb is called "a semantic Web application framework that supports reuse and object-oriented design." This is an interesting system that emphasizes the use of abstract and reusable blocks of code called "cubes", but may be too abstract or special for some developers.

Cubes are software components with schemas (data models), entities (programming logic), and views. By combining multiple cubes, each cube performs its own task, and you can write software applications by reusing your own code and other code.

3.Web2py

Web2py is a free open source Web framework written in Python language, which aims at agile and rapid development of Web applications, with fast, scalable, secure and portable database-driven applications, following the LGPLv3 open source protocol.

Web2py provides an one-stop solution, the whole development process can be carried out in the browser, providing the Web version of online development, HTML template writing, static file upload, database compilation functions. There are also logging functions and an automated admin interface.

4.Weppy

Weppy feels like an intermediate marker between the minimalist style of Flask and the integrity of Django. While developing Weppy applications is as straightforward as Flash, Weppy has many of the features of Django, such as the data tier and authentication. Therefore, Weppy is suitable for applications ranging from extremely simple to moderately complex.

5.Zope2

Zope is not suitable for simple RESTful API (per Bottle or Flask), or even for interactive basic websites (à la Django). Instead, it means a complete stack of enterprise-class application servers, similar to Java products. The document describes the framework as "most useful for component developers, integrators, and Web designers." A major third-party product, Plone CMS, uses Zope as its foundation and serves as the main driver of Zope's ongoing development.

6.Bottle

Bottle is a simple and efficient mini-python Web framework that follows WSGI. Micro is because it has only one file and does not rely on any third-party modules except the Python standard library.

The Bottle can be thought of as a mini flask because it is more compact and compact than other "micro-frames". Because of its smallest footprint, Bottle is ideal for inclusion in other projects or rapid delivery of small projects such as REST API.

7.CherryPy

CherryPy is a simple and very useful Web framework for Python, its main function is to connect the Web server with Python code with as little operation as possible, and its functions include built-in analysis functions, flexible plug-in system and the ability to run multiple HTTP servers at a time, which can be run on the latest versions of Python, Jython, and Android.

8.Falcon

If you are building a REST-based API rather than anything else, then what Falcon provides is absolutely necessary. Its design is concise and fast, with few dependencies outside the standard library.

A large part of the reason why Falcon gets the "frivolous" tag has nothing to do with the number of lines of code in the framework. This is because Falcon has almost no structure on the application.

Falcon also uses sensible out-of-the-box default settings, so there is little need to modify during installation.

Falcon's focus on API means that it is almost impossible to build Web applications using the traditional HTML user interface.

Falcon documents are slender compared to other frameworks, but only because of their small coverage. The user guide includes a formal step-by-step walkthrough of all major features, as well as a quick start section that allows you to view sample code with or without comments.

9.Flask

Flask is a lightweight Web application framework written in Python. Based on WerkzeugWSGI toolkit and Jinja2 template engine, use BSD authorization.

Flask is also called "microframework" because it uses a simple core and adds other functions with extension. Flask does not have database and form validation tools that are used by default. However, Flask retains the flexibility of expansion, and you can add these functions with Flask-extension: ORM, forms validation tools, file uploads, various open authentication technologies.

Flask is so light that it is possible to develop a simple website at little 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 validate form data, and SQLAlchemy + Flask-SQLAlchemy to control your database.

Flask is lightweight, but it is very scalable (more than 37000 star on Github know that the masses' choice makes sense), allowing us to customize our own features during development.

10.Pyramid

Pyramid is a very general open source web framework. As a framework, its first task is to make it easy for developers to create web applications. The type of web app doesn't matter. It can be an e-form, an intranet, or a social platform. Pyramid is very generic and can be used in a variety of situations.

Small and light, Pyramid is closer to Flask or even Falcon than Django. Therefore, it is ideal for exposing existing Python code as REST API or providing core tasks for Web projects where developers accomplish most of the onerous tasks.

Pyramid supports Python 2 and Python 3, but does not use the asynchronous syntax of Python 3.

11.Tornado

Tornado is a powerful and extensible Web server written in Python. It is robust enough to handle severe network traffic, but it is lightweight enough to be created and written, and can be used in a large number of applications and tools.

Characteristics of Tornado:

As a Web framework, it is a lightweight Web framework, similar to another Python web framework, Web.py, which has asynchronous non-blocking IO processing.

As a Web server, Tornado has excellent anti-load capability. The official deployment of Tornado using nginx reverse proxy is compared with other Python web application frameworks. As a result, the maximum number of views exceeds the second place and nearly 40%.

Tornado takes a small but sophisticated direction, focusing on superior performance, and is best known for its asynchronous non-blocking design.

12.Wheezy.web

Wheezy.web is the Flask/Bottle/Pyramid model of the Web framework: compact and lightweight, focused on providing high speed and high concurrency. The core of this feature set is small, but its creators have equipped it with a variety of necessary features.

The development of Wheezy seems to have stalled because the last submission of the project was recorded in 2015. This does not bode well for maintaining compatibility with the new Python features.

Summary:

We have analyzed 12 frameworks above. Five of them: Django,CubicWeb,Web2py,Weppy and Zope2, take a "control" approach and contain most of the functionality required by Web applications you can imagine. The remaining seven frameworks, Bottle,CherryPy,Falcon,Flask,Pyramid,Tornado, and Wheezy.web, provide a more concise look, transaction volume and integrity, and are easy to use.

Misunderstandings about framework selection:

When it comes to the choice of frameworks, many people are easily caught up in the following two misunderstandings: which framework is the best? There is no best framework in the world, only the one that works best for you and your team. Programming language choice is also a truth, your team Python most familiar with the use of Python, if the most familiar is Ruby, then use Ruby, programming language, framework are just tools, can be more, fast, good, save to finish the work is a good thing.

Pay too much attention to performance-in fact, most people don't need to care too much about the performance of the framework, because the site you develop is a small site, there are not many sites that can access 10, 000 IP sites, and very few of them are on 100000. It doesn't make much sense to talk about performance without a certain amount of traffic, because your CPU and memory are idle all the time.

After reading the above, do you have any further understanding of what are the 12 most popular Python web frameworks? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report