mantlebio package#

Subpackages#

Submodules#

Module contents#

class mantlebio.MantleClient(tenant_id=None, env='PROD', credentials=None)[source]#

Bases: object

Client to interact with MantleBio.

property analysis: AnalysisClient#

A property that provides access to the analysis object.

Returns:

The analysis object used for performing or managing various analysis tasks.

Return type:

object

property analysis_client#

A deprecated property that provides access to the analysis object.

Returns:

The analysis object associated with the instance. This property is deprecated and should be replaced by the ‘analysis’ property.

Return type:

object

Deprecated:

Since version 2.0.0. Use the ‘analysis’ property instead of ‘analysis_client’ for future code developments.

close()[source]#

Close the MantleClient

create_empty_entity()[source]#

Creates an Empty Entity to build later

create_entity(entity_type, properties=None, push_now=True)[source]#

Create a new Dataset object

Parameters:
  • entity_type (str) – unique id for dataset type to define the new dataset

  • properties (optional, dict) – properties to be appended to the new dataset

  • push_now (optional, bool) – if False, a dataset object will be created but only saved locally. If True, the object will be posted to the mantle API within the context of the current session

Returns:

Dataset object

Return type:

Dataset

property dataset: DatasetClient#

A property that provides access to the dataset object.

Returns:

The dataset object associated with the instance, typically providing access to dataset-related functionalities or data.

Return type:

object

Note

This property encapsulates the internal _dataset attribute, ensuring controlled access and potential for additional logic in future updates.

property entity: DatasetClient#

A property that provides access to the dataset object.

Returns:

The dataset object associated with the instance, typically providing access to dataset-related functionalities or data.

Return type:

object

Note

This property encapsulates the internal _dataset attribute, ensuring controlled access and potential for additional logic in future updates.

property entity_client#

A deprecated property that provides access to the entity object.

Returns:

The entity object associated with the instance. This property is deprecated and should be replaced by the ‘entity’ property.

Return type:

object

Deprecated:

Since version 2.0.0. It is recommended to use the ‘entity’ property instead of ‘entity_client’ for future implementations.

get_entities()[source]#

Get all Datasets

Returns:

List of Dataset objects

Return type:

list

get_entity(entity_id)[source]#

Get an entity

Parameters:

entity_id (str) – Entity ID

Returns:

Entity object

Return type:

Entity

get_pipeline(pipeline_id)[source]#

Send Get Pipeline request to api

Parameters:

pipeline_id (str) – the unique id of the pipeline

Returns:

Pipeline

Return type:

Pipeline

kick_off_pipeline_run(pipeline_id, pipeline_version, input_vals=None, exteral=False)[source]#

Create a new pipeline

Parameters:
  • pipeline_id (str) – Pipeline ID

  • name (str) – Pipeline Name

Returns:

Pipeline Run Object

Return type:

Analysis

load_analysis(id)[source]#

Load an existing analysis

Parameters:

id (str) – Analysis ID

Returns:

Analysis object

Return type:

Analysis

load_pipeline(pipeline_run_id)[source]#

Load an existing pipeline

Parameters:

pipeline_run_id (str) – Pipeline Run ID

Returns:

Analysis object

Return type:

Analysis

new_analysis(name)[source]#

Create a new analysis

Parameters:
  • analysis_id (str) – Analysis ID

  • name (str) – Analysis Name

Returns:

Analysis object

Return type:

Analysis

property pipeline: PipelineClient#

A property that provides access to the pipeline object.

Returns:

The pipeline object associated with the , used for handling or managing processing pipelines.

property pipeline_client#

A deprecated property that provides access to the pipeline object.

Returns:

The pipeline object associated with the instance. This property is deprecated and should be replaced by the ‘pipeline’ property.

Return type:

object

Deprecated:

Since version 2.0.0. It is advised to use the ‘pipeline’ property in place of ‘pipeline_client’ for newer implementations.

property pipeline_run: PipelineRunClient#

A property that provides access to the pipeline run object.

Returns:

The pipeline run object associated with the instance, used for managing or monitoring pipeline runs.

Return type:

object

property pipeline_run_client#

A deprecated property that provides access to the pipeline run object.

Returns:

The pipeline run object associated with the instance. This property is deprecated and should be replaced by the ‘pipeline’ property.

Return type:

object

Deprecated:

Since version 2.0.0. The ‘pipeline’ property should be used instead of ‘pipeline_run_client’ in new code.

property storage#

A property that provides access to the storage client.

Returns:

The storage client object for this instance, generally used for interacting with storage services (like databases or cloud storage).

Return type:

object