Client Models
Optimeering
- class optimeering_beta.models.AccessKeyCreated(*, created_at, description, expires_at, id)
- Parameters:
created_at (datetime) – Time stamp at which key was created.
description (str) – Description for the Access key.
expires_at (datetime) – Duration after which key expires.
id (int) – ID of the access key
- to_str()
Returns the string representation of the model using alias
- to_json()
Returns the JSON representation of the model using alias
- classmethod from_json(json_str)
Create an instance of AccessKeyCreated from a JSON string
- to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- classmethod from_dict(obj)
Create an instance of AccessKeyCreated from a dict
- to_pandas()
Converts the object into a pandas dataframe.
- class optimeering_beta.models.AccessKeyPostResponse(*, apikey, created_at, description, expires_at, id, owner_id)
- Parameters:
apikey (str) – API key
created_at (datetime) – Time stamp at which key was created.
description (str) – Description for the Access key.
expires_at (datetime) – Duration after which key expires.
id (int) – ID of the access key
owner_id (str) – Creator of the access key.
- to_str()
Returns the string representation of the model using alias
- to_json()
Returns the JSON representation of the model using alias
- classmethod from_json(json_str)
Create an instance of AccessKeyPostResponse from a JSON string
- to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- classmethod from_dict(obj)
Create an instance of AccessKeyPostResponse from a dict
- to_pandas()
Converts the object into a pandas dataframe.
- class optimeering_beta.models.AccessPostKey(*, description, expires_at=None)
- Parameters:
description (str) – Description for the Access key.
expires_at (ExpiresAt)
- to_str()
Returns the string representation of the model using alias
- to_json()
Returns the JSON representation of the model using alias
- classmethod from_json(json_str)
Create an instance of AccessPostKey from a JSON string
- to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- classmethod from_dict(obj)
Create an instance of AccessPostKey from a dict
- to_pandas()
Converts the object into a pandas dataframe.
- class optimeering_beta.models.End(*args, anyof_schema_1_validator=None, anyof_schema_2_validator=None, actual_instance=None, any_of_schemas={'datetime', 'str'})
The last datetime to fetch (exclusive). Defaults to 2999-12-30 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- classmethod from_json(json_str)
Returns the object represented by the json string
- to_json()
Returns the JSON representation of the actual instance
- to_dict()
Returns the dict representation of the actual instance
- to_str()
Returns the string representation of the actual instance
- class optimeering_beta.models.ExpiresAt(*args, anyof_schema_1_validator=None, anyof_schema_2_validator=None, actual_instance=None, any_of_schemas={'datetime', 'str'})
Duration after which key expires. Defaults to one year in the future.
- classmethod from_json(json_str)
Returns the object represented by the json string
- to_json()
Returns the JSON representation of the actual instance
- to_dict()
Returns the dict representation of the actual instance
- to_str()
Returns the string representation of the actual instance
- class optimeering_beta.models.HTTPValidationError(*, detail=None)
- Parameters:
detail (List[ValidationError])
- to_str()
Returns the string representation of the model using alias
- to_json()
Returns the JSON representation of the model using alias
- classmethod from_json(json_str)
Create an instance of HTTPValidationError from a JSON string
- to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- classmethod from_dict(obj)
Create an instance of HTTPValidationError from a dict
- filter(msg=None, type=None)
Filters items
- to_pandas()
Converts the object into a pandas dataframe.
- class optimeering_beta.models.MaxEventTime(*args, anyof_schema_1_validator=None, anyof_schema_2_validator=None, actual_instance=None, any_of_schemas={'datetime', 'str'})
If specified, will only return the latest prediction available at the specified time. If not specified, no filters are applied. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- classmethod from_json(json_str)
Returns the object represented by the json string
- to_json()
Returns the JSON representation of the actual instance
- to_dict()
Returns the dict representation of the actual instance
- to_str()
Returns the string representation of the actual instance
- class optimeering_beta.models.PredictionsData(*, events, series_id, version)
PredictionsData
contains a collection ofPredictionsEvent
for a givenPredictionSeries
- Parameters:
events (List[PredictionsEvent])
series_id (int) – Identifier for the series id.
version (str) – Version of the model that generated the predictions
- classmethod version_validate_regular_expression(value)
Validates the regular expression
- to_str()
Returns the string representation of the model using alias
- to_json()
Returns the JSON representation of the model using alias
- classmethod from_json(json_str)
Create an instance of PredictionsData from a JSON string
- to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- classmethod from_dict(obj)
Create an instance of PredictionsData from a dict
- filter(is_simulated=None)
Filters items
- to_pandas(unpack_value_method)
Converts the object into a pandas dataframe.
- Parameters:
unpack_value_method (str) –
- Determines how values are unpacked. Should be one of the following:
retain_original: Do not unpack the values.
new_rows: A new row will be created in the dataframe for each unpacked value. A new column value_category will be added which determines the category of the value.
new_columns: A new column will be created in the dataframe for each unpacked value. The columns for unpacked values will be prepended with value_.
- class optimeering_beta.models.PredictionsDataList(*, items, next_page=None)
A
PredictionsDataList
contains a collection ofPredictionsData
- Parameters:
items (List[PredictionsData])
next_page (str) – The next page of results (if available).
- to_str()
Returns the string representation of the model using alias
- to_json()
Returns the JSON representation of the model using alias
- classmethod from_json(json_str)
Create an instance of PredictionsDataList from a JSON string
- to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- classmethod from_dict(obj)
Create an instance of PredictionsDataList from a dict
- filter(series_id=None, version=None)
Filters items
- to_pandas(unpack_value_method)
Converts the object into a pandas dataframe.
- Parameters:
unpack_value_method (str) –
- Determines how values are unpacked. Should be one of the following:
retain_original: Do not unpack the values.
new_rows: A new row will be created in the dataframe for each unpacked value. A new column value_category will be added which determines the category of the value.
new_columns: A new column will be created in the dataframe for each unpacked value. The columns for unpacked values will be prepended with value_.
- class optimeering_beta.models.PredictionsEvent(*, created_at, event_time, is_simulated, predictions)
A
PredictionsEvent
contains a collection ofPredictionsValue
. If aPredictionsEvent
is simulated,is_simulated
will be true. See Prediction Versioning for an explanation on what simulated events are.- Parameters:
created_at (datetime) – The timestamp at which datapoint was registered
event_time (datetime) – Timestamp for when datapoint was generated.
is_simulated (bool)
predictions (List[PredictionsValue])
- to_str()
Returns the string representation of the model using alias
- to_json()
Returns the JSON representation of the model using alias
- classmethod from_json(json_str)
Create an instance of PredictionsEvent from a JSON string
- to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- classmethod from_dict(obj)
Create an instance of PredictionsEvent from a dict
- to_pandas(unpack_value_method)
Converts the object into a pandas dataframe.
- Parameters:
unpack_value_method (str) –
- Determines how values are unpacked. Should be one of the following:
retain_original: Do not unpack the values.
new_rows: A new row will be created in the dataframe for each unpacked value. A new column value_category will be added which determines the category of the value.
new_columns: A new column will be created in the dataframe for each unpacked value. The columns for unpacked values will be prepended with value_.
- class optimeering_beta.models.PredictionsSeries(*, area, created_at, description=None, id, latest_event_time=None, product, resolution, statistic, unit, unit_type)
A
PredictionsSeries
is used for indexing a series ofPredictionsData
.- Parameters:
area (str) – Areas to be filtered. E.g. NO1, NO2
created_at (datetime)
description (str)
id (int)
latest_event_time (datetime)
product (str) – Product name for the series
resolution (str) – Resolution of the series.
statistic (str) – Type of statistics.
unit (str) – The unit for the series.
unit_type (str) – Unit type for the series
- to_str()
Returns the string representation of the model using alias
- to_json()
Returns the JSON representation of the model using alias
- classmethod from_json(json_str)
Create an instance of PredictionsSeries from a JSON string
- to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- classmethod from_dict(obj)
Create an instance of PredictionsSeries from a dict
- datapoints(start=None, end=None)
Returns predictions.
If multiple versions of a prediction exist for a given series, the highest version is returned.
To get predictions for a particular version, use the
retrieve_versioned
method.- param start:
The first datetime to fetch (inclusive). Defaults to 1970-01-01 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- param end:
The last datetime to fetch (exclusive). Defaults to 2999-12-30 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- retrieve(start=None, end=None)
Returns predictions.
If multiple versions of a prediction exist for a given series, the highest version is returned.
To get predictions for a particular version, use the
retrieve_versioned
method.- param start:
The first datetime to fetch (inclusive). Defaults to 1970-01-01 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- param end:
The last datetime to fetch (exclusive). Defaults to 2999-12-30 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- retrieve_latest(max_event_time=None)
Returns predictions with the most recent
event_time
.If multiple versions of a prediction exist for a given series, the highest version is returned.
To get predictions for a particular version, use the
retrieve_versioned
method.- param max_event_time:
If specified, will only return the latest prediction available at the specified time. If not specified, no filters are applied. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- list_version(product=None, unit_type=None, statistic=None, area=None, resolution=None)
Returns prediction series and their versions.
- param product:
The product for which series should be retrieved. If not specified, will return series for all products.
- param unit_type:
Unit type. If not specified, will return series for all unit types.
- param statistic:
Statistic type. If not specified, will return series for all statistic types.
- param area:
The name of the area. If not specified, will return all areas.
- param resolution:
Resolution of the series. If not specified, will return series for all resolutions.
- to_pandas()
Converts the object into a pandas dataframe.
- class optimeering_beta.models.PredictionsSeriesList(*, items, next_page=None)
A
PredictionsSeriesList
contains a collection ofPredictionsSeries
.- Parameters:
items (List[PredictionsSeries])
next_page (str) – The next page of results (if available).
- to_str()
Returns the string representation of the model using alias
- to_json()
Returns the JSON representation of the model using alias
- classmethod from_json(json_str)
Create an instance of PredictionsSeriesList from a JSON string
- to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- classmethod from_dict(obj)
Create an instance of PredictionsSeriesList from a dict
- property series_ids
Returns all the series ids included in the response
- datapoints(start=None, end=None)
Returns predictions.
If multiple versions of a prediction exist for a given series, the highest version is returned.
To get predictions for a particular version, use the
retrieve_versioned
method.- param start:
The first datetime to fetch (inclusive). Defaults to 1970-01-01 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- param end:
The last datetime to fetch (exclusive). Defaults to 2999-12-30 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- retrieve(start=None, end=None)
Returns predictions.
If multiple versions of a prediction exist for a given series, the highest version is returned.
To get predictions for a particular version, use the
retrieve_versioned
method.- param start:
The first datetime to fetch (inclusive). Defaults to 1970-01-01 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- param end:
The last datetime to fetch (exclusive). Defaults to 2999-12-30 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- retrieve_latest(max_event_time=None)
Returns predictions with the most recent
event_time
.If multiple versions of a prediction exist for a given series, the highest version is returned.
To get predictions for a particular version, use the
retrieve_versioned
method.- param max_event_time:
If specified, will only return the latest prediction available at the specified time. If not specified, no filters are applied. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- list_version(product=None, unit_type=None, statistic=None, area=None, resolution=None)
Returns prediction series and their versions.
- param product:
The product for which series should be retrieved. If not specified, will return series for all products.
- param unit_type:
Unit type. If not specified, will return series for all unit types.
- param statistic:
Statistic type. If not specified, will return series for all statistic types.
- param area:
The name of the area. If not specified, will return all areas.
- param resolution:
Resolution of the series. If not specified, will return series for all resolutions.
- filter(area=None, id=None, product=None, resolution=None, statistic=None, unit=None, unit_type=None)
Filters items
- to_pandas()
Converts the object into a pandas dataframe.
- class optimeering_beta.models.PredictionsValue(*, prediction_for, value)
A
PredictionsValue
contains the value for a specific period of time as specified by theprediction_for
datetime.- Parameters:
prediction_for (datetime) – The time prediction is made for.’
value (Dict[str, float])
- to_str()
Returns the string representation of the model using alias
- to_json()
Returns the JSON representation of the model using alias
- classmethod from_json(json_str)
Create an instance of PredictionsValue from a JSON string
- to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- classmethod from_dict(obj)
Create an instance of PredictionsValue from a dict
- to_pandas(unpack_value_method)
Converts the object into a pandas dataframe.
- Parameters:
unpack_value_method (str) –
- Determines how values are unpacked. Should be one of the following:
retain_original: Do not unpack the values.
new_rows: A new row will be created in the dataframe for each unpacked value. A new column value_category will be added which determines the category of the value.
new_columns: A new column will be created in the dataframe for each unpacked value. The columns for unpacked values will be prepended with value_.
- class optimeering_beta.models.PredictionsVersion(*, area, created_at, description=None, id, latest_event_time=None, product, resolution, simulation_event_time_end, simulation_event_time_start, statistic, unit, unit_type, version)
A
PredictionsVersion
is used for indexing a specific version for a series ofPredictionsData
. For an explanation on versioned and simulated data see Prediction Versioning- Parameters:
area (str) – Areas to be filtered. E.g. NO1, NO2
created_at (datetime)
description (str)
id (int)
latest_event_time (datetime)
product (str) – Product name for the series
resolution (str) – Resolution of the series.
simulation_event_time_end (datetime) – The timestamp to which predictions is generated using simulation
simulation_event_time_start (datetime) – The timestamp from which predictions is generated using simulation
statistic (str) – Type of statistics.
unit (str) – The unit for the series.
unit_type (str) – Unit type for the series
version (str) – Version of the model that generated the predictions
- classmethod version_validate_regular_expression(value)
Validates the regular expression
- to_str()
Returns the string representation of the model using alias
- to_json()
Returns the JSON representation of the model using alias
- classmethod from_json(json_str)
Create an instance of PredictionsVersion from a JSON string
- to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- classmethod from_dict(obj)
Create an instance of PredictionsVersion from a dict
- retrieve_versioned(include_simulated=None, start=None, end=None)
Returns versioned predictions.
Use the
list_version
method to get the available versions for each prediction series.Can be used to retrieve both versioned and simulated data. For an explanation on versioned and simulated data see Prediction Versioning
- param include_simulated:
If false, filters out simulated prediction from response.
- param start:
The first datetime to fetch (inclusive). Defaults to 1970-01-01 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- param end:
The last datetime to fetch (exclusive). Defaults to 2999-12-30 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- convert_to_versioned_series()
Convert to VersionedSeries
- to_pandas()
Converts the object into a pandas dataframe.
- class optimeering_beta.models.PredictionsVersionList(*, items, next_page=None)
A
PredictionsVersionList
contains a collection ofPredictionsVersion
.- Parameters:
items (List[PredictionsVersion])
next_page (str) – The next page of results (if available).
- to_str()
Returns the string representation of the model using alias
- to_json()
Returns the JSON representation of the model using alias
- classmethod from_json(json_str)
Create an instance of PredictionsVersionList from a JSON string
- to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- classmethod from_dict(obj)
Create an instance of PredictionsVersionList from a dict
- retrieve_versioned(include_simulated=None, start=None, end=None)
Returns versioned predictions.
Use the
list_version
method to get the available versions for each prediction series.Can be used to retrieve both versioned and simulated data. For an explanation on versioned and simulated data see Prediction Versioning
- param include_simulated:
If false, filters out simulated prediction from response.
- param start:
The first datetime to fetch (inclusive). Defaults to 1970-01-01 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- param end:
The last datetime to fetch (exclusive). Defaults to 2999-12-30 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- filter(area=None, id=None, product=None, resolution=None, statistic=None, unit=None, unit_type=None, version=None)
Filters items
- convert_to_versioned_series()
Converts all items
- to_pandas()
Converts the object into a pandas dataframe.
- class optimeering_beta.models.Start(*args, anyof_schema_1_validator=None, anyof_schema_2_validator=None, actual_instance=None, any_of_schemas={'datetime', 'str'})
The first datetime to fetch (inclusive). Defaults to 1970-01-01 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- classmethod from_json(json_str)
Returns the object represented by the json string
- to_json()
Returns the JSON representation of the actual instance
- to_dict()
Returns the dict representation of the actual instance
- to_str()
Returns the string representation of the actual instance
- class optimeering_beta.models.ValidationError(*, loc, msg, type)
- Parameters:
loc (List[ValidationErrorLocInner])
msg (str)
type (str)
- to_str()
Returns the string representation of the model using alias
- to_json()
Returns the JSON representation of the model using alias
- classmethod from_json(json_str)
Create an instance of ValidationError from a JSON string
- to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- classmethod from_dict(obj)
Create an instance of ValidationError from a dict
- to_pandas()
Converts the object into a pandas dataframe.
- class optimeering_beta.models.ValidationErrorLocInner(*args, anyof_schema_1_validator=None, anyof_schema_2_validator=None, actual_instance=None, any_of_schemas={'int', 'str'})
- classmethod from_json(json_str)
Returns the object represented by the json string
- to_json()
Returns the JSON representation of the actual instance
- to_dict()
Returns the dict representation of the actual instance
- to_str()
Returns the string representation of the actual instance
- class optimeering_beta.models.VersionedSeries(*, series_id, version)
A
VersionedSeries
can be used withretrieve_versioned
to specify a version of a series to retrieve.- Parameters:
series_id (int) – Id of the series
version (str) – Version number of the series to filter
- classmethod version_validate_regular_expression(value)
Validates the regular expression
- to_str()
Returns the string representation of the model using alias
- to_json()
Returns the JSON representation of the model using alias
- classmethod from_json(json_str)
Create an instance of VersionedSeries from a JSON string
- to_dict()
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- classmethod from_dict(obj)
Create an instance of VersionedSeries from a dict
- to_pandas()
Converts the object into a pandas dataframe.