kappa_sdk.AnalysisResults#

class kappa_sdk.AnalysisResults(xml_string)[source]#

Wrapper for the results.xml from KW document.

Presents analysis results XML in convenient way, supporting both v1 and v2 schemas.

Note

Document.analysis_results property is populated on-demand and is cached for the duration of the Connection.

If you need to get actual values, use the Document.get_results_xml() method and instantiate this class with it.

Methods

AnalysisResults.get_analysis_names()

Returns a list of analysis names.

AnalysisResults.get_parameter_value(...)

Returns a value of a given parameter.

AnalysisResults.get_period_names(analysis_name)

Returns a list of extracted flow period names for a given analysis.

AnalysisResults.get_period_property_value(...)

Returns a value for a property of a given period.

AnalysisResults.get_productivity_index_table_elements([...])

Returns a dict with the productivity index table elements for each analysis name.

Parameters:

xml_string (str)

__init__(xml_string)[source]#
Parameters:

xml_string (str)

get_analysis_names()[source]#

Returns a list of analysis names.

Return type:

List[str]

get_productivity_index_table_elements(analysis_name=None)[source]#

Returns a dict with the productivity index table elements for each analysis name. If an analysis name is provided, it will return only the productivity index table elements of this analysis

Parameters:

analysis_name (str | None)

Return type:

Dict[str, Dict[str, Any]] | Dict[str, Any]

get_parameter_value(analysis_name, category_name, parameter_name)[source]#

Returns a value of a given parameter.

Parameters:
  • analysis_name (str) – The name of analysis.

  • category_name (str) – The name of parameter category.

  • parameter_name (str) – The name of the parameter.

Return type:

NumericValue | str | datetime

get_period_names(analysis_name)[source]#

Returns a list of extracted flow period names for a given analysis.

Parameters:

analysis_name (str) – The name of analysis.

Return type:

List[str]

get_period_property_value(analysis_name, period_name, value_name)[source]#

Returns a value for a property of a given period.

Parameters:
  • analysis_name (str) – The name of analysis.

  • period_name (str) – The name of the extracted flow period.

  • value_name (str) – The name of the period property.

Return type:

str