schemas.users#
Module Contents#
Classes#
Pydantic model for validating incoming user registration data. |
|
Pydantic model for serializing user data in responses. |
|
Pydantic model for validating incoming user update data. |
|
Pydantic model for serializing simplified user data in responses. |
|
Pydantic model for serializing JWT tokens. |
API#
- class schemas.users.UserSchema(**data: Any)#
Bases:
pydantic.BaseModelPydantic model for validating incoming user registration 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.
- full_name: str = 'Field(...)'#
- email: pydantic.EmailStr = None#
- password: str = 'Field(...)'#
- class schemas.users.UserResponse(**data: Any)#
Bases:
pydantic.BaseModelPydantic model for serializing user 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.
- id: int = 1#
- full_name: str = None#
- email: pydantic.EmailStr = None#
- avatar: str | None = None#
- role: src.entity.models.Role = None#
- picture_count: Optional[int] = None#
- created_at: datetime.datetime = None#
- class schemas.users.UserUpdate(**data: Any)#
Bases:
pydantic.BaseModelPydantic model for validating incoming user 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.
- full_name: str = None#
- email: pydantic.EmailStr = None#
- password: str = None#
- class schemas.users.AnotherUsers(**data: Any)#
Bases:
pydantic.BaseModelPydantic model for serializing simplified user 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.
- full_name: str = None#
- email: pydantic.EmailStr = None#
- avatar: str = None#
- picture_count: Optional[int] = None#
- created_at: datetime.datetime = None#
- class schemas.users.TokenSchema(**data: Any)#
Bases:
pydantic.BaseModelPydantic model for serializing JWT tokens.
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.
- access_token: str = None#
- refresh_token: str = None#
- token_type: str = 'bearer'#