| from typing import Callable, TypedDict, Optional | |
| from plotly.graph_objects import Figure | |
| class Plot(TypedDict): | |
| """Represents a plot configuration in the DRIAS system. | |
| This class defines the structure for configuring different types of plots | |
| that can be generated from climate data. | |
| Attributes: | |
| name (str): The name of the plot type | |
| description (str): A description of what the plot shows | |
| params (list[str]): List of required parameters for the plot | |
| plot_function (Callable[..., Callable[..., Figure]]): Function to generate the plot | |
| sql_query (Callable[..., str]): Function to generate the SQL query for the plot | |
| """ | |
| name: str | |
| description: str | |
| params: list[str] | |
| plot_function: Callable[..., Callable[..., Figure]] | |
| sql_query: Callable[..., str] | |
| plot_information: Callable[..., str] | |
| short_name: str |