FastAPI用户指南
参考文献:
FastAPI官方文档
中文翻译
(注意,当前2022年5月8日的中文翻译有一些错误)
介绍
FastAPI 是一个用于构建 API 的现代、快速(高性能)的 web 框架,使用 Python 3.6+ 并基于标准的 Python 类型提示。
FastAPI 站在以下巨人的肩膀之上:
* Starlette负责 web 部分。
* Pydantic负责数据部分。
安装
1
pip install fastapi
还需要一个 ASGI 服务器,生产环境可以使用Uvicorn或者Hypercorn。
1
pip install uvicorn[standard]