Telemetry¶
A simple pre-configured --telemetry/--no-telemetry option flag, that is respecting the proposed DO_NOT_TRACK environment variable as a unified standard to opt-out of telemetry for TUI/console apps.
It does nothing else.
click_extra.telemetry API¶
classDiagram
ExtraOption <|-- TelemetryOption
Telemetry utilities.
- class click_extra.telemetry.TelemetryOption(param_decls=None, default=False, expose_value=False, envvar=None, show_envvar=True, help='Collect telemetry and usage data.', **kwargs)[source]¶
Bases:
ExtraOptionA pre-configured
--telemetry/--no-telemetryoption flag.Respects the proposed DO_NOT_TRACK environment variable as a unified standard to opt-out of telemetry for TUI/console apps.
The
DO_NOT_TRACKconvention takes precedence over the user-defined environment variables and the auto-generated values.The resolved value is stored in
ctx.meta[click_extra.context.TELEMETRY], aligning with every other Click Extra option’s per-invocation context-meta storage pattern.See also
- set_telemetry(ctx, param, value)[source]¶
Store the resolved telemetry opt-in flag on the context’s
metadict.Reads via
click_extra.context.get(ctx, click_extra.context.TELEMETRY). Renamed fromsave_telemetryto align with theset_<key>convention used by every other ctx.meta-writing callback.- Return type: