MonitorConstructor

class MonitorConstructor(*args, **kwargs)[source]

Bases: Protocol

Common constructor for monitors, used in updaters.

Parameters:
  • attr (str) – attribute or nested attribute to target.

  • module (Module) – module to use as register base for monitoring.

Returns:

newly constructed monitor.

Return type:

Monitor

Important

The monitor returned must be registered.

Note

If it makes sense to, the module to which the monitor is registered should be the same as the module given. Where not sensible, it should be registered in a submodule along the attribute path attr.