DTOs

DTO models

DTOs

class app.shared.dto.BaseDTO

Bases: Generic[T]

Generic Data Transfer Object used for wrapping API responses.

__init__(data=None, error=None)
Parameters:
  • data (T | None)

  • error (str | None)

Return type:

None

data: T | None = None

The payload data of type T, or None if an error occurred.

error: str | None = None

The error description, or None if the operation was successful.

class app.shared.dto.T

Type variable representing the payload data type within the DTO.

alias of TypeVar(‘T’)