A few days ago, a friend left me a message saying: When will there be a useful summary of the Python framework (the list in this article is only a part, and does not include all Python frameworks), so today's article was born. (Suddenly I feel very nice)
Recommended one: Django (Recommended learning: Python video tutorial)
Django should be the most famous Python framework, GAE and even Erlang have frameworks affected by it. Django is taking a big and comprehensive direction. It is most famous for its fully automated management backend: just use the ORM and make simple object definitions, and it can automatically generate a database structure and a full-featured management backend.
Advantages:
Open source framework, with perfect documentation support
Many solutions, more internal function support
Elegant URL, complete routing System
Self-service background management
Disadvantages:
The system is tightly coupled, and it is very difficult to replace it with your favorite third-party library, even with some patches. It will also feel very awkward when you get on it.
The ORM that comes with Django is far less powerful than SQLAlchemy.
Template function is relatively weak and cannot insert Python code. To write more complex logic, you need to use Python to implement Tag or Filter.
Recommendation 2: Flask
Flask is a lightweight web application framework written in Python. Based on Werkzeug WSGI toolbox and Jinja2 template engine. Flask is also called a "microframework" because it uses a simple core and uses extensions to add additional functionality. Flask does not have a database or form validation tool used by default.
Advantages:
Flask is more flexible than Django. Before using Flask to build an application, it will give developers more flexibility when selecting components. Some application scenarios may not be suitable. Use a standard ORM (Object-Relational Mapping), or need to interact with different workflow and template systems.
Disadvantages:
Flask is just a kernel and relies on two external libraries by default: Jinja2 template engine and Werkzeug WSGI tool set. Many other functions are embedded in the form of extensions.
Recommendation 3: Scrapy
Scrapy is a fast, high-level screen scraping and web scraping framework developed in Python, used to scrape web sites and extract them from Extract structured data from the page. Scrapy is widely used and can be used for data mining, monitoring and automated testing.
Advantages:
Scrapy is a very powerful crawler framework. It can not only easily construct requests, but also has a powerful selector that can easily parse responses. However, its most popular Its performance includes the speed of crawling and parsing, its downloader is multi-threaded, and requests are scheduled and processed asynchronously. These two points make its crawling speed very fast.
In addition, there are built-in logging, exception, shell and other modules, which bring a lot of convenience to crawling work.
Disadvantages:
Scrapy is an encapsulated framework. It includes a downloader, parser, log and exception handling. It is based on multi-threading and twisted processing. For crawling a single website, It has advantages in development, but for crawling 100 websites from multiple websites, it is not flexible enough in terms of concurrent and distributed processing, and it is inconvenient to adjust and expand.
Recommendation 4: Tornado
Tornado is an open source version of web server software. There is a clear difference between Tornado and today's mainstream web server frameworks (including most Python frameworks): it is a non-blocking server and quite fast.
Advantages:
Tornado excels at providing infrastructure for applications that require tight control over the details of asynchronous networking. For example, Tornado not only provides a built-in asynchronous HTTP server, but also an asynchronous HTTP client. Therefore, Tornado is ideal for building applications, such as web scrapers or bots, that query other sites in parallel and operate on the returned data.
Disadvantages:
There are many third-party modules to choose from in the template and database parts, which is not conducive to encapsulation into a functional module.
Recommendation 5: Web2py
web2py is a full-featured Web application framework provided for the Python language. It is designed to develop Web applications agilely and quickly, with fast, safe and Portable database-driven application, compatible with Google App Engine.
Advantages:
The biggest attraction of Web2py is its built-in development environment. When you set up a Web2py instance, you are given a web interface, effectively an online Python application editor, where you can configure the components of your application. This usually means creating models, views, and controllers, each described through Python modules or HTML templates.
Disadvantages:
One important limitation of Web2py is that it is only compatible with Python 2.x. First this means that Web2py cannot use Python 3's asynchronous syntax. If you rely on external libraries that are unique to Python 3, you're out of luck. However, work is underway to make Web2py Python3 compatible and it is nearing completion at the time of writing.
Recommendation 6: Weppy
Weppy feels like the middle mark between the minimalist style of Flask and the completeness of Django. While developing Weppy applications has the directness of Flash, Weppy has many features found in Django, such as data layer and authentication. Therefore, Weppy is suitable for applications ranging from extremely simple to moderately complex.
Advantages:
Weppy’s documentation has the same style as the framework itself. It's clean, readable, and intended for human consumption. In addition to the usual "hello world" application examples, it also contains a good walkthrough tutorial that allows you to create a Weibo system as a beginner project.
Disadvantages:
Although Weppy has an extension mechanism, the list of officially approved add-ons is small, much smaller than Flask’s extension directory.
Recommendation 7: Bottle
Bottle can be considered a mini-flask because it is more compact and concise than other "micro-frameworks". Due to its minimal footprint, Bottle is ideal for inclusion in other projects or for quick delivery of small projects such as REST APIs.
Advantages:
Bottle does not require as much documentation as other frameworks, but the documentation is by no means stingy. All the key stuff fits into a single (albeit long) web page. In addition to this, you'll find full documentation for each API, examples of how to deploy on various infrastructures, explanations of the built-in templating language, and a collection of common recipes.
Disadvantages:
One consequence of Bottle’s minimalism is that some features simply don’t exist. Form validation, including CSRF protection and other features, is not supported. If you want to build a web application that supports a high degree of user interaction, you will need to add them yourself.
For more Python related technical articles, please visit the Python Tutorial column to learn!
The above is the detailed content of What frameworks are available in python?. For more information, please follow other related articles on the PHP Chinese website!

本篇文章给大家带来了关于Python的相关知识,其中主要介绍了关于Seaborn的相关问题,包括了数据可视化处理的散点图、折线图、条形图等等内容,下面一起来看一下,希望对大家有帮助。

本篇文章给大家带来了关于Python的相关知识,其中主要介绍了关于进程池与进程锁的相关问题,包括进程池的创建模块,进程池函数等等内容,下面一起来看一下,希望对大家有帮助。

本篇文章给大家带来了关于Python的相关知识,其中主要介绍了关于简历筛选的相关问题,包括了定义 ReadDoc 类用以读取 word 文件以及定义 search_word 函数用以筛选的相关内容,下面一起来看一下,希望对大家有帮助。

VS Code的确是一款非常热门、有强大用户基础的一款开发工具。本文给大家介绍一下10款高效、好用的插件,能够让原本单薄的VS Code如虎添翼,开发效率顿时提升到一个新的阶段。

本篇文章给大家带来了关于Python的相关知识,其中主要介绍了关于数据类型之字符串、数字的相关问题,下面一起来看一下,希望对大家有帮助。

pythn的中文意思是巨蟒、蟒蛇。1989年圣诞节期间,Guido van Rossum在家闲的没事干,为了跟朋友庆祝圣诞节,决定发明一种全新的脚本语言。他很喜欢一个肥皂剧叫Monty Python,所以便把这门语言叫做python。

本篇文章给大家带来了关于Python的相关知识,其中主要介绍了关于numpy模块的相关问题,Numpy是Numerical Python extensions的缩写,字面意思是Python数值计算扩展,下面一起来看一下,希望对大家有帮助。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Chinese version
Chinese version, very easy to use

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)
