INNER CODE UNIT · Python
ReferSources
datawhalechina/wow-fullstack · tutorial/FastAPI/第6章-FastAPI MCP/main.py:64
class ReferSources(BaseModel):
sources: List[str]
license: List[str]
class WeatherResponse(BaseModel):
code: str
updateTime: str
fxLink: str
now: WeatherNow
refer: ReferSources
class JWTRequest(BaseModel):
expiry_seconds: Optional[int] = 900 # 默认15分钟
custom_claims: Optional[dict] = None # 允许添加自定义声明
class WeatherQuery(BaseModel):
city: str = Field(..., description="城市名,如:北京")