Skip to main content

evo-colormaps

GitHub source

ColormapAPIClient

evo.colormaps.client.ColormapAPIClient

__init__

__init__(environment: Environment, connector: APIConnector) -> None

Parameters:

NameTypeDescriptionDefault
environmentEnvironmentThe environment objectrequired
connectorAPIConnectorThe connector object.required

get_service_health async

get_service_health(check_type: HealthCheckType = HealthCheckType.FULL) -> ServiceHealth

Get the health of the service.

Parameters:

NameTypeDescriptionDefault
check_typeHealthCheckTypeThe type of health check to perform.FULL

Returns:

TypeDescription
ServiceHealthA ServiceHealth object.

Raises:

TypeDescription
EvoApiExceptionIf the API returns an unexpected status code.
ClientValueErrorIf the response is not a valid service health check response.

create_colormap async

create_colormap(colormap: ContinuousColormap | DiscreteColormap | CategoryColormap, name: str) -> ColormapMetadata

Create a new colormap.

Parameters:

NameTypeDescriptionDefault
colormapContinuousColormap | DiscreteColormap | CategoryColormapThe colormap data.required
namestrThe name of the colormap.required

Returns:

TypeDescription
ColormapMetadataThe created colormap.

Raises:

TypeDescription
UnknownColormapTypeIf the colormap type is not recognized.
EvoApiExceptionIf the API returns an unexpected status code.

get_colormap_by_id async

get_colormap_by_id(colormap_id: UUID) -> ColormapMetadata

Get a colormap by ID.

Parameters:

NameTypeDescriptionDefault
colormap_idUUIDThe UUID of the colormap.required

Returns:

TypeDescription
ColormapMetadataA ColormapMetadata object representation of the colormap.

Raises:

TypeDescription
EvoApiExceptionIf the API returns an unexpected status code.

get_colormap_collection async

get_colormap_collection() -> list[ColormapMetadata]

Get all the colormaps in the current workspace.

Returns:

TypeDescription
list[ColormapMetadata]A list of ColormapMetadata object representations of the colormaps.

Raises:

TypeDescription
EvoApiExceptionIf the API returns an unexpected status code.

create_association async

create_association(object_id: UUID, association: Association) -> AssociationMetadata

Associate an existing colormap with a geoscience object.

Parameters:

NameTypeDescriptionDefault
object_idUUIDThe UUID of the geoscience object.required
associationAssociationThe association datarequired

Returns:

TypeDescription
AssociationMetadataAn AssociationMetadata object representation of the association.

Raises:

TypeDescription
EvoApiExceptionIf the API returns an unexpected status code.

create_batch_associations async

create_batch_associations(object_id: UUID, associations: list[Association]) -> list[AssociationMetadata]

Create multiple associations for a colormap to multiple object attributes.

Parameters:

NameTypeDescriptionDefault
object_idUUIDThe UUID of the geoscience object.required
associationslist[Association]A list of dictionaries containing attribute_id and colormap_id pairs.required

Returns:

TypeDescription
list[AssociationMetadata]A list of AssociationMetadata object representations of the associations.

Raises:

TypeDescription
EvoApiExceptionIf the API returns an unexpected status code.

get_association async

get_association(object_id: UUID, association_id: UUID) -> AssociationMetadata

Get the specific colormap association for a geoscience object given an association UUID.

Parameters:

NameTypeDescriptionDefault
object_idUUIDThe UUID of the geoscience object.required
association_idUUIDThe UUID of the association.required

Returns:

TypeDescription
AssociationMetadataAn AssociationMetadata object representation of the association.

Raises:

TypeDescription
EvoApiExceptionIf the API returns an unexpected status code.

get_association_collection async

get_association_collection(object_id: UUID) -> list[AssociationMetadata]

Get all associations for a geoscience object.

Parameters:

NameTypeDescriptionDefault
object_idUUIDThe UUID of the geoscience object.required

Returns:

TypeDescription
list[AssociationMetadata]A list of AssociationMetadata object representations of the associations.

Raises:

TypeDescription
EvoApiExceptionIf the API returns an unexpected status code.

What is the reason for your feedback?