程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Its 2022, you dont only know Django and Flask for the Python web framework, right?

編輯:Python

攜手創作,共同成長!這是我參與「掘金日新計劃 · 8 月更文挑戰」的第4天,點擊查看活動詳情

寫在前面

The birth of this article is very accidental,In the past two days, a little boy asked the eraser an old question,Python 基礎學完了,want to learn one Python Web 框架,是先學習 Django 呢,還是學習 Flask,What is the company using now??

every time this problem occurs,I will pull up a list,This time let's convert it directly into an article.

標題就叫做《2022 年,what you should learn Python Web 框架》

All frameworks covered below,Neither the official website nor any learning materials are provided,作為一個合格的程序員,You have to find these.

第一款:Flask

Let's learn this,輕便,靈活,定制性強,The point is to get started,and popular,

Eraser knows a lot Python Web The engineer will take this small job to do,==do it fast,來錢也快==.

Logo is a pepper icon,比較火熱~

第二款:Django

Python Web big brother in frame,大而全,Comes with a bunch of features,學會了之後,做後台管理系統,安裝之後,Just a few configurations.

有一定的學習門檻,Framework pattern follows MTV 模式,即模型,視圖,模板.

If you are a beginner django,掌握之後,回過頭來看 Flask,==呃,Small projects you will choose without hesitation Flask==.

第三款:tornado

是 Python Web 框架的同時,It is also an asynchronous network library,使用的是非阻塞 IO,所以處理速度特別快. 性能優秀,Excellent with high concurrency,But because it involves asynchrony IP 相關知識,So for beginners don't friendly,That is to say, the difficulty of learning is so high.

如果你 Python 基礎還不錯,那 tornado Also a lightweight for you Web 框架,and supports asynchronous programming and Web Socket,must learn this.

第四款:Bottle

一個遵循 WSGI 的微型 Web 框架,The whole shelf is a dozen K 的文件,contains routing,模板,simple data access,6 的飛起.

But it is also because of it“太簡陋"了,learn it,So people always ignore it.

第五款:Sanic

不新不舊,A lukewarm frame,基於 Python3.6+實現,支持 async/await 語法,So it is also an efficient framework.

The current problem is the lack of data,The ecology is not so good(Sanic Plugin documentation is almost non-existent),But the learning stage is definitely enough,語法非常類似 Flask,So I choose both Flask.

但是注意一點 Sanic 是異步框架,性能優於 Flask.

第六款:FastApi

沒錯,The hottest fried”現代“ Python Web 框架,Known as the first performance,Encoding speed first,Documentation is easiest,It can also help programmers reduce errors.

one more thing new,2019 年的框架,It's so hot now,So you have to learn.

其余 Python Web 框架

In addition to the framework mentioned above,There are also some minorities,or a wheel frame for special scenes.

如果你學有余力,can do some research.

falcon

A high-performance tool for building large-scale applications and microservices Python Web 框架.

pyramid

Known for efficient and fast-paced development Python Web 框架.

asgineer

支持異步的 Web 框架.

emmett

The promotion is more focused on the product,簡化開發過程,A framework to simplify grammar.

apidaora

Guess the name,It is a focus on Python Api 的框架.

hug

hug 的定義是一個 RESTFUL API 的框架,Framework for interface platform

blacksheep

BlackSheep 是一個異步 Web 框架,語法與 Flask 類似.

index.py

Focused on optimizing the route lookup function,Because of the claims to be the fastest Python Web 框架之一,But colleagues call themselves that. But its name is really unflattering,After all the eraser always creates a file called index.py 的文件.

starlette

一個輕量級的 ASGI 框架,In the back, the eraser will add an introduction to everyone ASGI 知識點的文章.

responder

底層是 starlette,是 kennethreitz 寫的,Quality is guaranteed,who is this big guy?requests 模塊的作者.

clastic

自己搜搜吧,這個不太了解,資料也不多.

molten

Is also a small mini development API 的框架

aiohttp

Write the crawler commonly used,基於 asyncio 和 異步 Web 框架.

cherrypy

與其它框架不同,cherrypy 有自己的想法,It expects developers to develop in accordance with object-oriented ideas Web 系統,So you can focus on this framework.

masonite

以 Django A framework for competitors,You should know what it is by now.

cyclone

Cyclone 將 Tornado API 實現為 Twisted 協議.

django-ninja

好家伙,這個是 Django 和 FastApi 的結合體,官方說的是 Fast Django REST Framework,And the slogan is:fast to learn,fast to code,fast to run,厲害,厲害.

web.py

Guido van Rossum 認為這是最好的 Python Web 框架,Too bad the author is no longer there.

總結

Python Web 框架非常多,many did not appear above,一個 Python Web Engineers only need to learn before 6 款即可,The rest of the study can work. In this article, you can collect,Then one thousand which day to~


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved