PricePower/calculator/schema.py

45 lines
842 B
Python

from dataclasses import dataclass
from typing import Dict, List, Optional
@dataclass
class Price:
hours: Dict[str, float]
now: Optional[float] = None # Price in current hour
@dataclass
class CheapestHours:
hours: List[int]
is_cheapest: Optional[bool] = None
@dataclass
class MostExpensiveHours:
hours: List[int]
is_the_most_expensive: Optional[bool] = None
@dataclass
class DayPrice:
monthly_fees: float
monthly_fees_hour: float
kwh_fees_low: float
kwh_fees_high: float
sell_fees: float
low_tariff_hours: List[int]
hour: int
vat: float
spot: Price
total: Price
sell: Price
cheapest_hours: CheapestHours
most_expensive_hours: MostExpensiveHours
cheapest_hours_by_average: CheapestHours
most_expensive_hours_by_average: MostExpensiveHours