schemas.images#
Module Contents#
Classes#
Pydantic model for validating incoming picture data. |
|
Pydantic model for validating incoming picture update data. |
|
Pydantic model for serializing picture data in responses. |
API#
- class schemas.images.PictureSchema(**data: Any)#
Bases:
pydantic.BaseModelPydantic model for validating incoming picture data.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
- description: Optional[str] = 'Field(...)'#
- tags: Optional[str] = 'Field(...)'#
- class schemas.images.PictureUpdateSchema(**data: Any)#
Bases:
pydantic.BaseModelPydantic model for validating incoming picture update data.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
- description: Optional[str] = 'Field(...)'#
- class schemas.images.PictureResponseSchema(**data: Any)#
Bases:
pydantic.BaseModelPydantic model for serializing picture data in responses.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
- user_id: int = None#
- picture_id: int = None#
- url: str = None#
- description: Optional[str] = None#
- tags: Optional[List[str]] = []#
- created_at: datetime.datetime = None#
- comments: Optional[list[str]] = []#