mantlebio.core.dataset.mantle_dataset module#

class mantlebio.core.dataset.mantle_dataset.MantleDataset(dataset_input=None, session=None, storage_client=None, local=False, entity_input=None)[source]#

Bases: _IDataset

_wrap_method(method)[source]#
add_s3_file_property(key, bucket, s3_key)[source]#

Add an S3 property to the dataset.

download_s3(key, local_path)[source]#

Download a file from S3.

property entity: Entity#

Get the entity of the dataset.

property entity_pb2: Entity#

Return the entity_pb2 object

get_id()[source]#

Get the ID of the dataset.

Return type:

str

get_property(key)[source]#

Get a property of the dataset.

Return type:

Optional[Message]

push()[source]#

Push the dataset to the server.

set_data_type(data_type)[source]#

Set the data type of the dataset.

set_name(name)[source]#

Set the name of the dataset.

set_property(key, value)[source]#

Set a property of the dataset.

to_dict()[source]#

Convert the dataset to a dictionary.

Returns:

The dataset as a dictionary.

Return type:

Dict[str, Any]

to_proto()[source]#

Convert the dataset to a protocol buffer object.

Return type:

Entity

to_series()[source]#

Convert the dataset to a pandas Series.

Returns:

The dataset as a pandas Series.

Return type:

pd.Series

upload_s3(key, local_path)[source]#

Upload a file to S3.

Return type:

None

class mantlebio.core.dataset.mantle_dataset.MantleEntity(entity_input, session, storage_client)[source]#

Bases: MantleDataset

class mantlebio.core.dataset.mantle_dataset._IDataset(dataset_input, session, storage_client, local=False, entity_input=None)[source]#

Bases: ResponseItem

abstract add_s3_file_property(key, bucket, s3_key)[source]#

Add an S3 property to the dataset.

Return type:

None

abstract download_s3(key, local_path)[source]#

Download a file from S3.

Return type:

None

abstract property entity: Entity#

Get the entity of the dataset.

entity_pb2#

Return the entity_pb2 object

abstract get_id()[source]#

Get the ID of the dataset.

Return type:

str

abstract get_property(key)[source]#

Get a property of the dataset.

Return type:

Optional[Message]

abstract push()[source]#

Push the dataset to the server.

Return type:

None

abstract set_data_type(data_type)[source]#

Set the data type of the dataset.

Return type:

None

abstract set_name(name)[source]#

Set the name of the dataset.

Return type:

None

abstract set_property(key, value)[source]#

Set a property of the dataset.

Return type:

None

abstract to_proto()[source]#

Convert the dataset to a protocol buffer object.

Return type:

Entity

abstract upload_s3(key, local_path)[source]#

Upload a file to S3.

Return type:

None

class mantlebio.core.dataset.mantle_dataset._IEntity(entity_input, session, storage_client)[source]#

Bases: _IDataset