Skip to content

Schema

UserCreateDTO

Bases: BaseModel

DTO for creating new user instance.

Source code in hestia/web/api/user/schema.py
25
26
27
28
29
30
class UserCreateDTO(BaseModel):
    """DTO for creating new user instance."""

    username: str
    hashed_password: str
    user_type: UserType

UserModelDTO

Bases: BaseModel

DTO for user models.

It returned when accessing user models from the API.

Source code in hestia/web/api/user/schema.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
class UserModelDTO(BaseModel):
    """
    DTO for user models.

    It returned when accessing user models from the API.
    """

    id: UUID
    username: str
    hashed_password: str
    user_type: UserType

    class Config:
        orm_mode = True
        arbitrary_types_allowed = True