mirror of
https://github.com/kennethreitz/pydantic.git
synced 2026-06-05 23:00:18 +00:00
11 lines
143 B
Python
11 lines
143 B
Python
from pydantic import BaseModel
|
|
|
|
|
|
class Model(BaseModel):
|
|
a: int
|
|
b: float
|
|
c: str
|
|
|
|
|
|
print(Model(a=3.1415, b=' 2.72 ', c=123).dict())
|