ColormapAPIClient
ColormapAPIClient
evo.colormaps.client.ColormapAPIClient
__init__
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
environment | Environment | The environment object | required |
connector | APIConnector | The connector object. | required |
get_service_health async
Get the health of the service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
check_type | HealthCheckType | The type of health check to perform. | FULL |
Returns:
| Type | Description |
|---|---|
ServiceHealth | A ServiceHealth object. |
Raises:
| Type | Description |
|---|---|
EvoApiException | If the API returns an unexpected status code. |
ClientValueError | If the response is not a valid service health check response. |
create_colormap async
Create a new colormap.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
colormap | ContinuousColormap | DiscreteColormap | CategoryColormap | The colormap data. | required |
name | str | The name of the colormap. | required |
Returns:
| Type | Description |
|---|---|
ColormapMetadata | The created colormap. |
Raises:
| Type | Description |
|---|---|
UnknownColormapType | If the colormap type is not recognized. |
EvoApiException | If the API returns an unexpected status code. |
get_colormap_by_id async
Get a colormap by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
colormap_id | UUID | The UUID of the colormap. | required |
Returns:
| Type | Description |
|---|---|
ColormapMetadata | A ColormapMetadata object representation of the colormap. |
Raises:
| Type | Description |
|---|---|
EvoApiException | If the API returns an unexpected status code. |
get_colormap_collection async
Get all the colormaps in the current workspace.
Returns:
| Type | Description |
|---|---|
list[ColormapMetadata] | A list of ColormapMetadata object representations of the colormaps. |
Raises:
| Type | Description |
|---|---|
EvoApiException | If the API returns an unexpected status code. |
create_association async
Associate an existing colormap with a geoscience object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
object_id | UUID | The UUID of the geoscience object. | required |
association | Association | The association data | required |
Returns:
| Type | Description |
|---|---|
AssociationMetadata | An AssociationMetadata object representation of the association. |
Raises:
| Type | Description |
|---|---|
EvoApiException | If the API returns an unexpected status code. |
create_batch_associations async
Create multiple associations for a colormap to multiple object attributes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
object_id | UUID | The UUID of the geoscience object. | required |
associations | list[Association] | A list of dictionaries containing attribute_id and colormap_id pairs. | required |
Returns:
| Type | Description |
|---|---|
list[AssociationMetadata] | A list of AssociationMetadata object representations of the associations. |
Raises:
| Type | Description |
|---|---|
EvoApiException | If the API returns an unexpected status code. |
get_association async
Get the specific colormap association for a geoscience object given an association UUID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
object_id | UUID | The UUID of the geoscience object. | required |
association_id | UUID | The UUID of the association. | required |
Returns:
| Type | Description |
|---|---|
AssociationMetadata | An AssociationMetadata object representation of the association. |
Raises:
| Type | Description |
|---|---|
EvoApiException | If the API returns an unexpected status code. |
get_association_collection async
Get all associations for a geoscience object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
object_id | UUID | The UUID of the geoscience object. | required |
Returns:
| Type | Description |
|---|---|
list[AssociationMetadata] | A list of AssociationMetadata object representations of the associations. |
Raises:
| Type | Description |
|---|---|
EvoApiException | If the API returns an unexpected status code. |