需要依赖一个Python模块:【fastapi】

Documentationhttps://fastapi.tiangolo.com
Source Codehttps://github.com/tiangolo/fastapi

因为要使用异步网关接口(ASGI),因此需要依赖模块:【uvicorn】

首先,使用pip安装这两个模块包的依赖:

代码:

运行:

WEB访问:http://127.0.0.1:8090/

WEB访问:http://127.0.0.1:8090/items/5?q=you%27re%20welcome

查看帮助文档:http://127.0.0.1:8090/docs

对帮助文档进行编辑:http://127.0.0.1:8090/redoc


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

隐藏
变装