mirror of
https://github.com/kennethreitz/pydantic.git
synced 2026-06-05 23:00:18 +00:00
13 lines
223 B
Python
13 lines
223 B
Python
import inspect
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class FooModel(BaseModel):
|
|
id: int
|
|
name: str = None
|
|
description: str = 'Foo'
|
|
apple: int = Field(..., alias='pear')
|
|
|
|
|
|
print(inspect.signature(FooModel))
|