DTO Module
Contains the DTOMixin class.
- class arrowhead_client.dto.DTOMixin(**data)
-
Mixin to create data-transfer objects from class.
This class is a customized version of
pydantic.BaseModel, which gives it some quirks:When subclassing
DTOMixin, you should not specify__init__, instead you use the attribute syntax(?).A subclass of
DTOMixinmust be instantiated with keyword arguments.A subclass of
DTOMixincan alternatively be instantiated with keyword arguments in camelCase form.
For a more detailed explanation of how to use
DTOMixin, check the data transfer object user guide.Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- Return type
None