#!/usr/bin/python3# -*- coding:utf-8 -*-# __author__ = '__Jack__'from fastapi import APIRouter, Depends, Request"""【见coronavirus应用】SQL (Relational) Databases FastAPI的数据库操作""""""Bigger Applications - Multiple Files 多应用的目录结构设计"""async def get_user_agent(request: Request):print(request.headers["User-Agent"])app07 = APIRouter(prefix="/bigger_applications",tags=["第七章 FastAPI的数据库操作和多应用的目录结构设计"], # 与run.py中的tags名称相同dependencies=[Depends(get_user_agent)],responses={200: {"description": "Good job!"}},)@app07.get("/bigger_applications")async def bigger_applications():return {"message": "Bigger Applications - Multiple Files"}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。