Python中的pydantic 2026-01-13 概述 from pydantic import BaseModel class Person(BaseModel): name:str age:int p = Person(name = "john", age = 123) print(p)