kappa_sdk.UserTask#
- class kappa_sdk.UserTask(field_id, well_id, custom_workflow_id, user_task_id, name, user_task_instance_id, data_types_catalog, outputs, plots, files, well_property_container, field_api, processing_api, plot_dto_converter, user_task_dto_converter)[source]#
User task object.
Presents a KAPPA Automate user task information object.
Attributes
Get the custom workflow id of the
UserTaskobject.Gets the list of the documents under this
UserTask.Gets the list of the files under this
UserTask.Gets the id of the
UserTaskobject.Retrieves the user task inputs.
Gets the name of the
UserTask.Gets the list of outputs of the
UserTask.Gets the list of the plot instances of the
UserTask.Gets the user task definition name of the
UserTaskobject.Gets the user task id (processing service) of the
UserTaskobject.Gets the id of well property container associated with the user task
Methods
UserTask.create_plot(plot_name[, pane_name, ...])Create a Kappa Automate Plot instance under the user task
Delete the User Task
UserTask.rename(new_name)Rename the User Task
UserTask.upload_file(file_path[, overwrite])Uploads a file to this
User Task.- Parameters:
field_id (str)
well_id (str)
custom_workflow_id (str | None)
user_task_id (str)
name (str)
user_task_instance_id (str)
data_types_catalog (FieldDataTypesCatalog)
outputs (List[Data])
plots (List[Plot])
files (List[File])
well_property_container (str | None)
field_api (FieldAPI)
processing_api (ProcessingAPI)
plot_dto_converter (PlotDtoConverter)
user_task_dto_converter (UserTaskDtoConverter)
- __init__(field_id, well_id, custom_workflow_id, user_task_id, name, user_task_instance_id, data_types_catalog, outputs, plots, files, well_property_container, field_api, processing_api, plot_dto_converter, user_task_dto_converter)[source]#
- Parameters:
field_id (str)
well_id (str)
custom_workflow_id (str | None)
user_task_id (str)
name (str)
user_task_instance_id (str)
data_types_catalog (FieldDataTypesCatalog)
outputs (List[Data])
plots (List[Plot])
files (List[File])
well_property_container (str | None)
field_api (FieldAPI)
processing_api (ProcessingAPI)
plot_dto_converter (PlotDtoConverter)
user_task_dto_converter (UserTaskDtoConverter)
- create_plot(plot_name, pane_name=None, square_log_cycles=False, stacked_bars=False, x_label='', is_x_log=False, labels=None)[source]#
Create a Kappa Automate Plot instance under the user task
- Parameters:
plot_name (str) – Name of plot
pane_name (str | None) – Name of the pane
square_log_cycles (bool) – Whether or not use Square log cycles
stacked_bars (bool) – Whether or not use stacked bars
x_label (str) – x label
is_x_log (bool) – Whether or not use logarithmic scale for x values
labels (List[str] | None) – Add some labels to the plot
- Returns:
Plot– The new Plot instance created under the task.- Return type:
- property user_task_instance_id: str#
Gets the user task id (processing service) of the
UserTaskobject.
- property well_property_container_id: str#
Gets the id of well property container associated with the user task
- property inputs: List[Dict[str, bool | str | float]]#
Retrieves the user task inputs.
- Returns:
List[Dict[str, Union[bool, str, float]]]: A list of dictionaries, each containing the name and value of a user task input. The value can be of type bool, str, or float.
- upload_file(file_path, overwrite=False)[source]#
Uploads a file to this
User Task.- Parameters:
file_path (str) – Full path and name of the file to upload.
overwrite (bool) – A value indicating whether to overwrite a file with the same name if it already exists in the well.
automatic_extraction – A value indicating whether to perform automatic extraction of well properties if uploading a KW file.
- Returns:
File– An uploaded file object.- Return type: