pyk.telemetry module

class TelemetryConfig(user, consent)[source]

Bases: NamedTuple

consent: bool

Alias for field number 1

static load() TelemetryConfig[source]

Load config from disk.

Raises:
  • FileNotFoundError – If the config file does not exist.

  • ValueError – If the user_id field is missing from the config file.

user: str

Alias for field number 0

write() None[source]

Persist config to disk.

emit_event(event: str, properties: dict[str, Any] | None = None) None[source]

Send a telemetry event to the proxy server.

Parameters:
  • event – Event name to track.

  • properties – Optional key/value metadata (e.g. {'version': '1.2.3'}).