kappa_sdk.WellPropertyContainer#
- class kappa_sdk.WellPropertyContainer(context, well_property_container_id, name, well_properties_catalog, labels, is_master, cluster_apis, dto_converter)[source]#
Well property container object.
Presents a KAPPA Automate well property container object.
Attributes
Gets the id of the
WellPropertyContainerobject.Gets a value indicating whether this contains is a master one.
Gets the labels of the
WellPropertyContainerobject.Gets the name of the
WellPropertyContainer.Methods
Adds well property values for a specified well property alias, creating the well property if it does not already exist and attaching the provided data to it. Only works for numeric well properties. :param well_property_alias: The alias of the well property to which the values will be added. If the well property does not already exist, it will be created using the provided data. :type well_property_alias:
str:param vector: The vector containing the values to be added. :type vector:BaseVector:param is_step_at_start: Indicates whether the values should be treated as step changes starting from the given date. Default is True. :type is_step_at_start:bool, optional :param first_x: The starting date for the well property. This is used if the property needs to be created and applies only in that context. :type first_x:datetime, optional.Deletes values of a given well property for a given range in this
WellPropertyContainer, all values will be deleted if from_time and to_time are undefined.WellPropertyContainer.get_non_numeric_well_property_values(...)Retrieves non-numeric well property values based on the provided parameters.
Gets a dictionary of alias/value pairs for all well properties in this
WellPropertyContainer.Gets a vector of values for a given well property from this
WellPropertyContainer.Sets a value for a well property.
- Parameters:
context (KAContext)
well_property_container_id (str)
name (str)
well_properties_catalog (FieldWellPropertiesCatalog)
labels (List[str])
is_master (bool)
cluster_apis (ClusterAPIS)
dto_converter (WellPropertyDtoConverter)
- __init__(context, well_property_container_id, name, well_properties_catalog, labels, is_master, cluster_apis, dto_converter)[source]#
- Parameters:
context (KAContext)
well_property_container_id (str)
name (str)
well_properties_catalog (FieldWellPropertiesCatalog)
labels (List[str])
is_master (bool)
cluster_apis (ClusterAPIS)
dto_converter (WellPropertyDtoConverter)
- property id: str#
Gets the id of the
WellPropertyContainerobject.
- property name: str#
Gets the name of the
WellPropertyContainer.
- property is_master: bool#
Gets a value indicating whether this contains is a master one.
- property labels: List[str]#
Gets the labels of the
WellPropertyContainerobject.
- get_well_properties(validity_date=None)[source]#
Gets a dictionary of alias/value pairs for all well properties in this
WellPropertyContainer.- Parameters:
validity_date (datetime | None) – The validity date of values. If not specified, latest values will be returned.
- Return type:
Dict[str, Any]
- get_well_property_values(well_property_alias, from_time=None, to_time=None, count=-1, last=False, unit=None)[source]#
Gets a vector of values for a given well property from this
WellPropertyContainer. Only works for numeric well properties. :param well_property_alias: The alias of the well property. :param from_time: Date to start reading from. :param to_time: Date to read the data up to. :param count: Maximum count of points to return, regardless of from/to settings. :param last: Will return last (count) of points if set to true. :param unit: Convert values from internal units to a specific unit.
- get_non_numeric_well_property_values(well_property_alias, from_time=None, to_time=None, count=-1, last=False)[source]#
Retrieves non-numeric well property values based on the provided parameters.
This method fetches non-numeric well property values associated with the specified well property alias. The data retrieval can be filtered by specifying a time range, a count of values to fetch, or by retrieving the most recent values.
- Parameters:
well_property_alias (
str) – The alias of the well property for which values are to be retrieved.from_time (
Optional[datetime], optional) – The starting point of the time range for retrieving values (default is None, which implies no lower boundary for the time).to_time (
Optional[datetime], optional) – The ending point of the time range for retrieving values (default is None, which implies no upper boundary for the time).count (
int, optional) – The maximum number of values to be retrieved. Use -1 for no limit (default is -1).last (
bool, optional) – Whether to retrieve the most recent values. If True, retrieves the most recent data up to the specified count (default is False).
- Returns:
NonNumericVector– A vector containing non-numeric well property values, along with their associated dates.- Return type:
NonNumericVector
- delete_well_property_values(well_property_alias, from_time=None, to_time=None)[source]#
Deletes values of a given well property for a given range in this
WellPropertyContainer, all values will be deleted if from_time and to_time are undefined.- Parameters:
well_property_alias (str) – The alias of well property to update.
from_time (datetime | None) – The date from where values have to be removed, can be None
to_time (datetime | None) – The date until where values have to be removed, can be None
- Return type:
None
- set_well_property_value(well_property_alias, value, timestamp=None, is_step_at_start=True, first_x=None)[source]#
Sets a value for a well property.
This method sets the given value for a specified well property. If the property does not exist in the current set of well properties, it will be created using additional parameters. Otherwise, it updates the well property values based on the provided arguments.
- Parameters:
well_property_alias (
str) – Alias of the well property for which the value is to be set.value (
Optional[Union[str,bool,float]]) – Value to be set for the well property. The format and type of the value depend on the specific property.timestamp (
Optional[datetime], optional) – Timestamp at which the value is to be recorded. If not provided, the current UTC time will be used, by default None.is_step_at_start (
bool, optional) – Determines whether the step is at the start or end when recording the value, by default True.first_x (
Optional[datetime], optional) – Indicates the starting timestamp of the time series for the property, used when the well property does not yet exist, by default None, only used when you are in step at end.
- Return type:
None
- add_well_property_values(well_property_alias, vector, is_step_at_start=True, first_x=None)[source]#
Adds well property values for a specified well property alias, creating the well property if it does not already exist and attaching the provided data to it. Only works for numeric well properties. :param well_property_alias: The alias of the well property to which the values will be added. If the well property
does not already exist, it will be created using the provided data.
- Parameters:
vector (
BaseVector) – The vector containing the values to be added.is_step_at_start (
bool, optional) – Indicates whether the values should be treated as step changes starting from the given date. Default is True.first_x (
datetime, optional) – The starting date for the well property. This is used if the property needs to be created and applies only in that context.well_property_alias (
str)
- Returns:
None– This method does not return any value. It performs the operation of creating or updating the well property values in the backend system.- Return type:
None