solarforecastarbiter.datamodel.MetricValue¶
-
class
solarforecastarbiter.datamodel.
MetricValue
(category: str, metric: str, index: str, value: float)[source]¶ Class for storing the result of a single metric calculation.
Parameters: -
__init__
(category: str, metric: str, index: str, value: float) → None¶
Methods
__init__
(category, metric, index, value)from_dict
(input_dict[, raise_on_extra])Construct a dataclass from the given dict, matching keys with the class fields. replace
(**kwargs)Convience wrapper for dataclasses.replace()
to create a new dataclasses from the old with the given keys replaced.to_dict
()Convert the dataclass into a dictionary suitable for uploading to the API. -