SDKPython SDK

Core objects & lifecycle

Understand the responsibilities and close hierarchy of Sdk, Exo, ExoDevice, and channels.

Current version · 1.4.0

Core objects & lifecycle

Object hierarchy

Sdk
└── Exo                  sdk.exo()
    └── ExoDevice       exo.device(name)
        ├── telemetry()
        ├── status()
        └── haptics()
  • Sdk owns the native runtime and device configuration; normally create one per process.
  • Exo controls startup, scheduling, stopping, health, and close for the Exo domain.
  • ExoDevice selects a logical device and exposes information, channels, and haptics.
  • ReadChannel supports latest(), subscribe(), and asynchronous next().

Status and health

device.status() is a continuously published ReadChannel[ExoStatus] for observing connection changes, stale data, the latest error, and reconnect count. device.health() and exo.health() return an aggregate Health snapshot at call time, which is more suitable for control flow and diagnostic logs. They are complementary: subscribe to status() to observe changes, and read health() for an immediate summary.

Lifecycle

For one device, prefer exo.start() → run → exo.stop() → exo.close(). Use device.start() and device.stop() only when multiple devices must be controlled independently.

Closing a device invalidates that device's channels and subscriptions. Closing Exo invalidates every ExoDevice and channel in the domain. Later calls raise ClosedHandleError; root sdk.close() cleans up remaining resources, but normal shutdown should still stop and close explicitly in hierarchy order.