# posthog

Python API: `luxonis_ml.telemetry.backends.posthog`

## Classes

### PostHogBackend

PostHog backend using the official python package.

#### Methods

##### init

```python
def __init__(config: TelemetryConfig):
```

Initialize the PostHog client.

Parameters

 * `config` (`TelemetryConfig`): Telemetry backend configuration.

Raises

 * `ValueError`: If the PostHog API key is missing.
 * `ImportError`: If the `posthog` package is not installed.

##### capture

```python
def capture(event: TelemetryEvent):
```

Capture an event using the PostHog client.

##### flush

```python
def flush(self):
```

Flush buffered PostHog events if supported.

## Attributes

### PROTECTED_POSTHOG_PROPERTY_KEYS
