# events

Python API: `luxonis_ml.telemetry.events`

## 类

### TelemetryEvent

表示单个遥测事件。

#### 方法

##### create

```python
def create(*, name: str, properties: dict[str, Any], context: dict[str, Any], distinct_id: str | None = None, schema_version: int = 1) -> TelemetryEvent:
```

创建带有 UTC 时间戳的遥测事件。

参数

 * `name` (`str`): 事件名称。
 * `properties` (`dict[str, Any]`): 净化后的事件属性。
 * `context` (`dict[str, Any]`): 要附加到事件的合并上下文。
 * `distinct_id` (`str | None`): 可选的后端身份覆盖。
 * `schema_version` (`int`): 事件模式版本。

返回

 * `TelemetryEvent`: 带有 UTC 时间戳的遥测事件。

##### to_payload

```python
def to_payload(self) -> dict[str, Any]:
```

将事件序列化为 JSON 友好的字典。

#### 属性

##### context

##### distinct_id

##### name

##### properties

##### schema_version

##### timestamp
