Course Code: fastapi
Duration: 14 hours
Prerequisites:
  • 了解API概念
  • Python 编程经验

观众

  • 开发者
Overview:

FastAPI 是一个开源,高性能的网页框架,用于构建 APIs 与 Python. 它是由许多大型公司,如Uber, Netflix,和 Microsoft使用。

由教练引导,现场培训(在线或在线)旨在开发人员谁希望使用 FastAPI 与 Python 建立,测试和部署 RESTful APIs 更容易和更快。

在本研讨会结束后,参与者将能够:

  • 设置必要的开发环境,以使用 Python 和 FastAPI 开发 APIs。
  • 使用 FastAPI 函式库更快速、更轻松地创建 APIs。
  • 学习如何基于 Pydantic 和 OpenAPI 创建数据模型和模式。
  • 使用 SQLAlchemy 将 APIs 连接到资料库。
  • 使用 FastAPI 工具在 APIs 中实现安全性和身份验证。
  • 构建容器镜像并将 Web APIs 部署到云端伺服器。

课程格式

  • 互动式讲座与讨论。
  • 大量练习与实践。
  • 在即时实验室环境中进行实际操作。

课程定制选项

  • 如需为本课程请求定制培训,请联系我们以安排。
Course Outline:

介绍

  • FastAPI vs Django vs Flask
  • FastAPI 的功能和优势概述

开始

  • 安装 FastAPI
  • 使用 OpenAPI 定义架构

路径和查询参数

  • 声明路径参数类型
  • 解析和验证数据
  • 声明必要和可选参数
  • 转换查询参数类型
  • 多个路径和查询参数

使用 Pydantic 模型声明请求正文

  • 创建数据模型
  • 结合路径、查询和正文参数
  • 声明验证和元数据
  • 使用深度嵌套模型
  • 定义示例数据
  • 回应和额外模型

定义表单和档

  • 使用表单字段代替 JSON
  • 创建文件参数
  • 使用文件和表单参数

处理错误

  • 使用 HTTPException
  • 添加自定义标头
  • 安装自定义异常处理程序
  • 覆盖默认异常处理程序

使用 Databases

  • ORMs 和文件结构
  • 创建 SQLAlchemy 部件
  • 创建数据库模型
  • 创建 Pydantic 模型
  • 执行 CRUD 操作
  • 创建表格、依赖项和路径操作
  • 检查和审查文件
  • 与数据库交互

安全和身份验证

  • 使用 Oauth2 和 OpenID connect
  • 使用 OpenAPI 定义多种安全方案
  • 使用 FastAPI 工具

部署

  • 部署概念、阶段和工具
  • 使用 Gunicorn 和 Uvicorn
  • 使用容器系统(Docker 和 Kubernetes)

故障排除

摘要和后续步骤

Sites Published:

United Arab Emirates - Developing APIs with Python and FastAPI

Qatar - Developing APIs with Python and FastAPI

Egypt - Developing APIs with Python and FastAPI

Saudi Arabia - Developing APIs with Python and FastAPI

South Africa - Developing APIs with Python and FastAPI

Brasil - Developing APIs with Python and FastAPI

Canada - Developing APIs with Python and FastAPI

中国 - Developing APIs with Python and FastAPI

香港 - Developing APIs with Python and FastAPI

澳門 - Developing APIs with Python and FastAPI

台灣 - Developing APIs with Python and FastAPI

USA - Developing APIs with Python and FastAPI

Österreich - Developing APIs with Python and FastAPI

Schweiz - Developing APIs with Python and FastAPI

Deutschland - Developing APIs with Python and FastAPI

Czech Republic - Developing APIs with Python and FastAPI

Denmark - Developing APIs with Python and FastAPI

Estonia - Developing APIs with Python and FastAPI

Finland - Developing APIs with Python and FastAPI

Greece - Developing APIs with Python and FastAPI

Magyarország - Developing APIs with Python and FastAPI

Ireland - Developing APIs with Python and FastAPI

Luxembourg - Developing APIs with Python and FastAPI

Latvia - Developing APIs with Python and FastAPI

España - Developing APIs with Python and FastAPI

Italia - Developing APIs with Python and FastAPI

Lithuania - Developing APIs with Python and FastAPI

Nederland - Developing APIs with Python and FastAPI

Norway - Developing APIs with Python and FastAPI

Portugal - Developing APIs with Python and FastAPI

România - Developing APIs with Python and FastAPI

Sverige - Developing APIs with Python and FastAPI

Türkiye - Developing APIs with Python and FastAPI

Malta - Developing APIs with Python and FastAPI

Belgique - Developing APIs with Python and FastAPI

France - Developing APIs with Python and FastAPI

日本 - Developing APIs with Python and FastAPI

Australia - Developing APIs with Python and FastAPI

Malaysia - Developing APIs with Python and FastAPI

New Zealand - Developing APIs with Python and FastAPI

Philippines - Developing APIs with Python and FastAPI

Singapore - Developing APIs with Python and FastAPI

Thailand - Developing APIs with Python and FastAPI

Vietnam - Developing APIs with Python and FastAPI

India - Developing APIs with Python and FastAPI

Argentina - Developing APIs with Python and FastAPI

Chile - Developing APIs with Python and FastAPI

Costa Rica - Developing APIs with Python and FastAPI

Ecuador - Developing APIs with Python and FastAPI

Guatemala - Developing APIs with Python and FastAPI

Colombia - Developing APIs with Python and FastAPI

México - Developing APIs with Python and FastAPI

Panama - Developing APIs with Python and FastAPI

Peru - Developing APIs with Python and FastAPI

Uruguay - Developing APIs with Python and FastAPI

Venezuela - Developing APIs with Python and FastAPI

Polska - Developing APIs with Python and FastAPI

United Kingdom - Developing APIs with Python and FastAPI

South Korea - Developing APIs with Python and FastAPI

Pakistan - Developing APIs with Python and FastAPI

Sri Lanka - Developing APIs with Python and FastAPI

Bulgaria - Developing APIs with Python and FastAPI

Bolivia - Developing APIs with Python and FastAPI

Indonesia - Developing APIs with Python and FastAPI

Kazakhstan - Developing APIs with Python and FastAPI

Moldova - Developing APIs with Python and FastAPI

Morocco - Developing APIs with Python and FastAPI

Tunisia - Developing APIs with Python and FastAPI

Kuwait - Developing APIs with Python and FastAPI

Oman - Developing APIs with Python and FastAPI

Slovakia - Developing APIs with Python and FastAPI

Kenya - Developing APIs with Python and FastAPI

Nigeria - Developing APIs with Python and FastAPI

Botswana - Developing APIs with Python and FastAPI

Slovenia - Developing APIs with Python and FastAPI

Croatia - Developing APIs with Python and FastAPI

Serbia - Developing APIs with Python and FastAPI

Bhutan - Developing APIs with Python and FastAPI

Nepal - Developing APIs with Python and FastAPI

Uzbekistan - Developing APIs with Python and FastAPI