from typing import Any
from pydantic import BaseModel
from .async_request import *
from .logger import *
from .attachment import *
from .request_parser import RequestParser
from .pdf_saver import *
from .to_dict import *
from .web import *

requestDict = RequestParser()


class Answer(BaseModel):
    success: bool
    message: Optional[str]
    data: Optional[Any]


def answer(success: bool = True, data: Any = None, message: str = None) -> Answer:
    """
    Docstring для answer

    :param success: Успешность выполнения
    :type success: bool
    :param data: Данные
    :type data: Any
    :param message: Сообщение
    :type message: str
    :return: Экземпляр Answer
    :rtype: Answer
    """
    return Answer(success=success, message=message, data=data)
