Evo colormaps - Evo Python SDK

GitHub source

## evo.colormaps.client.ColormapAPIClient

### __init__

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

Parameters:

Name | Type | Description | Default
--- | --- | --- | ---
`environment` | `Environment` | The environment object | required
`connector` | `APIConnector` | The connector object. | required

### get_service_health `async`

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

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_colormap(colormap: ContinuousColormap | DiscreteColormap | CategoryColormap, name: str) -> ColormapMetadata

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_colormap_by_id(colormap_id: UUID) -> ColormapMetadata

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_colormap_collection() -> list[ColormapMetadata]

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`

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

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_batch_associations(object_id: UUID, associations: list[Association]) -> list[AssociationMetadata]

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_association(object_id: UUID, association_id: UUID) -> AssociationMetadata

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_association_collection(object_id: UUID) -> list[AssociationMetadata]

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.

#### Keyboard Shortcuts

Keys | Action
--- | ---
`?` | Open this help
`n` | Next page
`p` | Previous page
`s` | Search