mirror of
https://github.com/kennethreitz/pydantic.git
synced 2026-06-05 23:00:18 +00:00
17b5ff42c1
* renaming docs examples * tweaks
8 lines
196 B
Python
8 lines
196 B
Python
from pydantic import BaseModel, create_model
|
|
|
|
DynamicFoobarModel = create_model('DynamicFoobarModel', foo=(str, ...), bar=123)
|
|
|
|
class StaticFoobarModel(BaseModel):
|
|
foo: str
|
|
bar: int = 123
|