Metric

class pyniryo_nate.Metric(name: str, init_value: T, _type: Type[T])[source]

Bases: object

Descriptor class for defining custom metrics that can be monitored.

This class is used as a descriptor in user-defined classes to create metrics that automatically publish updates when their values change.

Parameters:
  • name (str) – The name of the metric.

  • init_value (T) – The initial value of the metric.

  • _type (Type[T]) – The Python type of the metric value.

Attributes

Methods

property tr_value: str