msticpy.init.pivot_core.pivot_register_reader module

Reads pivot registration config files.

msticpy.init.pivot_core.pivot_register_reader.add_unbound_pivot_function(func: Callable[[Any], Any], pivot_reg: PivotRegistration | None = None, container: str = 'other', **kwargs)

Add a pivot function to entities.

Parameters:
  • func (Callable[[Any], Any]) – The function to add

  • pivot_reg (PivotRegistration, optional) – Pivot registration object, by default None

  • container (str, optional) – The name of the container into which the function should be added, by default “other”

  • kwargs – If pivot_reg is not supplied you can specify required pivot registration parameters via keyword arguments. You must specify input_type (str) and entity_map (dict of entity_name, entity_attribute pairs)

See also

PivotRegistration

msticpy.init.pivot_core.pivot_register_reader.register_pivots(file_path: str, namespace: Dict[str, Any] | None = None, container: str = 'other', force_container: bool = False, **kwargs)

Register pivot functions from configuration file.

Parameters:
  • file_path (str) – Path to config yaml file

  • namespace (Dict[str, Any], optional) – Namespace to search for existing instances of classes, by default None

  • container (str, optional) – Container name to use for entity pivot functions, by default “other”

  • force_container (bool, optional) – Force container value to be used even if entity definitions have specific setting for a container name, by default False

Raises:

ValueError – An entity specified in the config file is not recognized.