PricePower/calculator/schema.py

45 lines
842 B
Python
Raw Permalink Normal View History

2024-08-07 23:31:21 +00:00
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
2024-08-07 23:31:21 +00:00
@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]
2024-08-08 08:36:30 +00:00
hour: int
2024-08-07 23:31:21 +00:00
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
2024-08-07 23:31:21 +00:00