Files
parser/api/schemas.py
2026-05-19 22:36:49 +10:00

43 lines
1009 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
Pydantic схемы для API
"""
from pydantic import BaseModel, HttpUrl
from typing import List
class ParserOneRequest(BaseModel):
"""Запрос для парсинга первого источника"""
time: str
class Parserall(BaseModel):
"""Запрос для парсинга любого источника"""
url: HttpUrl
promt: str
class Parserall_url(BaseModel):
"""Запрос URL для источника"""
url: HttpUrl
class Source(BaseModel):
"""Модель источника для настроек"""
name: str
promt: str
class DownloadRange(BaseModel):
"""Диапазон дат для скачивания файлов"""
data_start: str
data_finish: str
field_name: str = "status"
class DownloadCountsResponse(BaseModel):
"""Ответ с количеством статей для выгрузки по каждому полю"""
tematik: int
svodka: int
donesenie: int
bilutene: int