Skip to main content

SDK

The Fusion SDK is a Python client for interacting with the Clarity platform programmatically. It lets you upload imagery, manage labels, pull down datasets and model artifacts, and read inference results from your own scripts and notebooks.

Available on request

The SDK is provisioned to specific customers and is not part of the standard platform package. If you'd like access, contact the Metaspectral team.

Installation

The SDK is distributed as a Python wheel (fusion_sdk-<version>-py3-none-any.whl) provided by the Metaspectral team.

We recommend installing it into a fresh virtual environment to keep its dependencies isolated from your other projects:

# Create and activate a new virtual environment (Python 3.10+)
python -m venv .venv
source .venv/bin/activate # on Windows: .venv\Scripts\activate

# Install the wheel
pip install /path/to/fusion_sdk-<version>-py3-none-any.whl

Getting started

Create a client with your service token:

from fusion_sdk.implementations_v2.common.enums import SDKEnvironmentEnum
from fusion_sdk.implementations_v2.FusionSDKV2 import FusionSDKV2

sdk = FusionSDKV2(
service_token="<your-service-token>",
environment=SDKEnvironmentEnum.PROD,
)

The sdk object exposes five top-level modules. Each module's get methods return resource objects you can inspect and act on.

Features

  • Images - Upload HSI files, fetch image metadata, attach labels, and download imagery.
  • Folders - Walk the folder tree and bulk-download all imagery beneath a folder.
  • Dataset versions - Pull down ML datasets along with their labels and train/validation/test splits.
  • Model versions - Retrieve trained models, browse their inference results, and download model artifacts.
  • Class collections - Create and inspect the class collections used for labeling.