types
DTO domain types.
DTOConfig
dataclass
¶
DTOField
dataclass
¶
For configuring DTO behavior on SQLAlchemy model fields.
pydantic_field
class-attribute
¶
If provided, used for the pydantic model for this attribute.
pydantic_type
class-attribute
¶
Override the field type on the pydantic model for this attribute.
validators
class-attribute
¶
Single argument callables that are defined on the DTO as validators for the field.
Mark ¶
For marking column definitions on the domain models.
Example:
Purpose ¶
For identifying the purpose of a DTO to the factory.
The factory will exclude fields marked as private or read-only on the domain model depending on the purpose of the DTO.
Example: