Metadata-Version: 2.4
Name: kernel_sdk
Version: 6.13.0
Classifier: Programming Language :: Python :: 3
Requires-Dist: psutil
Requires-Dist: pyjwt>=2.8.0,<3
Requires-Dist: numpy
Requires-Dist: sentry-sdk>=0.11.2
Requires-Dist: requests
Summary: Python SDK with rust bindings for Kernel applications and hardware
Author-email: Kernel <software@kernel.com>
Requires-Python: >=3.11
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# kernel.sdk

Python SDK for subscribing to telemetry from Kernel hardware via the kortex driver, and for
commanding connected devices.

## Installation

```
pip install kernel_sdk
```

## Documentation

- **[sdk.html](https://assets.kernel.com/docs/sdk.html)** — `SdkClient` reference: subscriptions,
  device control, probe geometry, and the online/offline recording workflows.
- **[task.html](https://assets.kernel.com/docs/task.html)** — `TaskClient` reference: emitting
  experiment, block, trial, and stimulus events from your task code.
- **[syncbox.html](https://assets.kernel.com/docs/syncbox.html)** — Syncbox reference: digital I/O,
  analog inputs, comparators, and the syncbox telemetry streams.

They also ship inside the package, under `kernel/sdk/docs/`.

## Quick start

```python
from kernel.sdk import SdkClient, MomentNumber, Wavelength

client = SdkClient()

def on_data(timestamps, data):
    print(timestamps.shape, data.shape)

future = client.on_moments(MomentNumber.First, Wavelength.Red, on_data)
```

Commanding a syncbox on the same client:

```python
client.syncbox.set_digital_output(0)
client.syncbox.set_digital_output_state(0, on=True)
```

