stolichki/crawler/types.py

19 lines
383 B
Python
Raw Normal View History

2024-01-03 14:34:15 +10:00
from dataclasses import dataclass
2024-01-05 16:08:19 +10:00
from typing import Literal
2024-01-05 15:52:44 +10:00
from crawler.utils.classes import DataclassBase
2024-01-03 14:34:15 +10:00
@dataclass(init=False)
class City(DataclassBase):
2024-01-05 15:52:44 +10:00
id: int = 0
2024-01-03 14:34:15 +10:00
city: str
region_id: int | None
region_name: str | None
2024-01-05 16:08:19 +10:00
is_byapt: Literal[1, 0]
2024-01-03 14:34:15 +10:00
@dataclass(init=False)
class Proxy(DataclassBase):
ip: str
port: str
login: str
password: str