# cyclopts

Python API: `luxonis_ml.telemetry.cli.cyclopts`

## Functions

### instrument_cyclopts

```python
def instrument_cyclopts(app: cyclopts.App, telemetry: Telemetry, *, allowlist: set[str] | None = None, include_system_metadata: bool | None = None, exclude_commands: set[str] | None = None):
```

Wrap Cyclopts commands to emit telemetry events.

The wrapper walks the app recursively, so it also instruments the commands of every sub-app. Aliases share one app object, so the
wrapper instruments each sub-app once.

> **Note**
> The wrapper skips the generated help and version callbacks. Use [luxonis_ml.telemetry.cli.skip_telemetry](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/telemetry/cli/cyclopts.md) on a single callback to exclude that command as well.

Parameters

 * `app` (`cyclopts.App`): The Cyclopts application to instrument.
 * `telemetry` (`Telemetry`): The telemetry client that captures the events.
 * `allowlist` (`set[str] | None`): Names of the command arguments you allow in the event. One allowlist covers every instrumented
   command. If omitted, no argument value is sent. The wrapper always drops `self`, `ctx`, and `context`, and it drops any Click
   or Typer context object.
 * `include_system_metadata` (`bool | None`): Whether to attach system metadata to the events. If omitted, the telemetry
   configuration decides.
 * `exclude_commands` (`set[str] | None`): Full command names to leave uninstrumented, such as `{"data parse"}`. Nested names use
   a space between the parts.
