Install the TheiaSDK Python package using pip:
pip install git+https://github.com/harmoneyes/HarmonEyesTheia.git
TheiaSDK requires a valid license key. Contact us to obtain a license.
| Platform | Description |
|---|---|
| "PL" | Pupil Labs Neon |
| "Ganzin" | Ganzin Sol |
| "Webcam" | Webcam tracking |
| "WT" | Default / mock tracker (for testing) |
Your license enables specific models:
COGNITIVE_LOAD_MODELFATIGUE_MODELMENTAL_READINESSATTENTIONQuestions about the SDK, your license key, or a setup problem? Email support@harmoneyes.com and our team will get back to you.
harmoneyes_theia.TheiaSDK(
license_key,
platform="PL",
)
| Parameter | Type | Default | Description |
|---|---|---|---|
| license_key | str | Required | Your SDK license key |
| platform | str | "PL" | Eye tracking platform ("PL", "WT") |
start_new_session(session_uuid, task_type)stop_processing()start_realtime_video()start_realtime_data()get_cog_load_levels()(levels_dict, batch_number) — levels_dict holds value (0 = low, 1 = moderate, 2 = high), label, and confidence.get_fatigue_level()(fatigue_dict, batch_number) — value (0–3), label, confidence.get_mental_readiness(elapsed_seconds)low_percentage, moderate_percentage and high_percentage (summing to 100.0), or None while the session is still too short.get_attention()None until at least 20 valid observations have accumulated.get_video_frame()has_connection_timeout()is_video_streaming()predict_cog_load_batch(data, n_jobs=1)predict_fatigue_batch(data, timezone=None, prediction_stride=120, n_jobs=1)refine_cog_load_batch(data, refining_data, n_jobs=1)reset_models_batch()save_refined_model()reset_to_base_model()get_model_info()The SDK raises specific exceptions for error conditions:
LicenseValidationError — invalid license key format or tampered licenseLicenseExpiredError — license has expiredLicenseNetworkError — network issues when validating the licenseLicenseFeatureNotEntitledError — feature not enabled in the licensefrom harmoneyes_theia import (
LicenseValidationError,
LicenseExpiredError,
LicenseFeatureNotEntitledError,
)
try:
sdk = harmoneyes_theia.TheiaSDK(
license_key="your-license-key",
platform="PL",
)
except LicenseValidationError as e:
print(f"License validation failed: {e}")
except LicenseExpiredError as e:
print(f"License expired: {e}")