https://pypi.org/库中搜索python第三方模块flask
flask官方文档:
https://flask.palletsprojects.com/en/2.2.x/
Project description
Flask is a lightweight WSGI web application framework.
It is designed to make getting started quick and easy, with the ability to scale up to complex applications.
It began as a simple wrapper around Werkzeug and Jinja and has become one of the most popular Python web application frameworks.
Flask offers suggestions, but doesn’t enforce any dependencies or project layout.
It is up to the developer to choose the tools and libraries they want to use.
There are many extensions provided by the community that make adding new functionality easy.
Install and update using pip:
$ pip install -U Flask
A Simple Example
# save this as app.py
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello, World!"
$ flask run
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
D:\>
D:\>
D:\>py -3 -m pip install flask
Collecting flask
Downloading Flask-2.2.2-py3-none-any.whl (101 kB)
|████████████████ | 51 kB 5.3 kB/s eta 0:00:
|███████████████████▌ | 61 kB 6.4 kB/s eta 0
|██████████████████████▌ | 71 kB 5.1 kB/s et
|██████████████████████████ | 81 kB 5.8 kB/s
|█████████████████████████████ | 92 kB 6.0 k
|████████████████████████████████| 101 kB 6
.5 kB/s
Collecting Werkzeug>=2.2.2
Downloading Werkzeug-2.2.2-py3-none-any.whl (232 kB)
|██████████████ | 102 kB 5.0 kB/s eta 0:00:2
|███████████████▌ | 112 kB 5.0 kB/s eta 0:00
|█████████████████ | 122 kB 4.7 kB/s eta 0:0
|██████████████████ | 133 kB 3.5 kB/s eta 0:
|████████████████████ | 143 kB 3.5 kB/s eta
|█████████████████████ | 153 kB 3.5 kB/s eta
|██████████████████████▌ | 163 kB 4.2 kB/s e
|████████████████████████ | 174 kB 4.2 kB/s
|█████████████████████████▌ | 184 kB 5.0 kB/
|███████████████████████████ | 194 kB 5.0 kB
|████████████████████████████ | 204 kB 4.6 k
|█████████████████████████████▌ | 215 kB 4.1
|███████████████████████████████ | 225 kB 4.
|████████████████████████████████| 232 kB 7
.1 kB/s
Collecting Jinja2>=3.0
Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
|███████████████ | 61 kB 5.1 kB/s eta 0:00:1
|█████████████████ | 71 kB 5.0 kB/s eta 0:00
|████████████████████ | 81 kB 5.0 kB/s eta 0
|██████████████████████ | 92 kB 5.6 kB/s eta
|████████████████████████▌ | 102 kB 5.5 kB/s
|███████████████████████████ | 112 kB 5.5 kB
|█████████████████████████████▌ | 122 kB 6.6
|████████████████████████████████| 133 kB 6
.6 kB/s
Collecting importlib-metadata>=3.6.0
Downloading importlib_metadata-4.12.0-py3-none-any.whl (21 kB)
Collecting itsdangerous>=2.0
Downloading itsdangerous-2.1.2-py3-none-any.whl (15 kB)
Collecting click>=8.0
Downloading click-8.1.3-py3-none-any.whl (96 kB)
|█████████████▌ | 40 kB 3.4 kB/s eta 0:00:17
|█████████████████ | 51 kB 3.5 kB/s eta 0:00
|████████████████████▌ | 61 kB 4.2 kB/s eta
|████████████████████████ | 71 kB 3.8 kB/s e
|███████████████████████████ | 81 kB 3.3 kB/
|██████████████████████████████▌ | 92 kB 3.8
|████████████████████████████████| 96 kB 4.
1 kB/s
Requirement already satisfied: colorama in d:\program files\python38\lib\site-pa
ckages (from click>=8.0->flask) (0.4.5)
Collecting zipp>=0.5
Downloading zipp-3.8.1-py3-none-any.whl (5.6 kB)
Collecting MarkupSafe>=2.0
Downloading MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl (17 kB)
Installing collected packages: zipp, MarkupSafe, Werkzeug, Jinja2, itsdangerous,
importlib-metadata, click, flask
Successfully installed Jinja2-3.1.2 MarkupSafe-2.1.1 Werkzeug-2.2.2 click-8.1.3
flask-2.2.2 importlib-metadata-4.12.0 itsdangerous-2.1.2 zipp-3.8.1
WARNING: You are using pip version 21.1.1; however, version 22.2.2 is available.
You should consider upgrading via the 'D:\Program Files\Python38\python.exe -m p
ip install --upgrade pip' command.
D:\>