utils
Things that make working with DTOs nicer.
config ¶
field ¶
Create dto.DTOField()
wrapped in a dict for SQLAlchemy info field.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mark |
Mark | Literal['read-only', 'private'] | None
|
How this field should be treated by the model factory. |
None
|
pydantic_type |
Any | None
|
Override the type annotation for this field. |
None
|
pydantic_field |
FieldInfo | None
|
Result of Pydantic's |
None
|
validators |
Iterable[Callable[[Any], Any]] | None
|
Added to the generated model as validators, with |
None
|