from pydantic import BaseModel from typing import Optional class Foo(BaseModel): x: int y: int = 42 z: Optional[int] print(Foo(x=3).json())
確定! 回上一頁