msticpy/datamodel/pivot.py
def remove_pivot_funcs(entity: str):
        """
        Remove pivot functions from one or all entities.

        Parameters
        ----------
        entity : str
            entity class name or "all" to remove all pivot functions.

        Raises
        ------
        ValueError
            If entity is not a recognized entity class.

        """
        all_entities = dir(entities)
        if entity != "all":
            if entity not in all_entities:
                raise ValueError(f"Entity name '{entity}' not found.")
            entity_names = [entity]
        else:
            entity_names = all_entities
        for entity_name in entity_names:
            entity_cls = getattr(entities, entity_name)
            for attr in dir(entity_cls):
                attr_obj = getattr(entity_cls, attr)
                if type(attr_obj).__name__ == "QueryContainer":
                    delattr(entity_cls, attr)
                if callable(attr_obj) and hasattr(attr_obj, "pivot_properties"):
                    delattr(entity_cls, attr)

        Remove pivot functions from one or all entities.

        Parameters
        ----------
        entity : str
            entity class name or "all" to remove all pivot functions.

        Raises
        ------
        ValueError
            If entity is not a recognized entity class.

        
Remove pivot functions from one or all entities.
Parameters

entity : str
entity class name or "all" to remove all pivot functions.

Raises

ValueError
If entity is not a recognized entity class.
Remove pivot functions from one or all entities . Parameters entity : str entity class name or " all " to remove all pivot functions . Raises ValueError If entity is not a recognized entity class .
def remove_pivot_funcs(entity: str):
        all_entities = dir(entities)
        if entity != "all":
            if entity not in all_entities:
                raise ValueError(f"Entity name '{entity}' not found.")
            entity_names = [entity]
        else:
            entity_names = all_entities
        for entity_name in entity_names:
            entity_cls = getattr(entities, entity_name)
            for attr in dir(entity_cls):
                attr_obj = getattr(entity_cls, attr)
                if type(attr_obj).__name__ == "QueryContainer":
                    delattr(entity_cls, attr)
                if callable(attr_obj) and hasattr(attr_obj, "pivot_properties"):
                    delattr(entity_cls, attr)
def remove_pivot_funcs ( entity : str ) : all_entities = dir ( entities ) if entity != "all" : if entity not in all_entities : raise ValueError ( f"Entity name '{entity}' not found." ) entity_names = [ entity ] else : entity_names = all_entities for entity_name in entity_names : entity_cls = getattr ( entities , entity_name ) for attr in dir ( entity_cls ) : attr_obj = getattr ( entity_cls , attr ) if type ( attr_obj ) . __name__ == "QueryContainer" : delattr ( entity_cls , attr ) if callable ( attr_obj ) and hasattr ( attr_obj , "pivot_properties" ) : delattr ( entity_cls , attr )
Remove pivot functions from one or all entities.
Remove pivot functions from one or all entities .
"""
        Remove pivot functions from one or all entities.

        Parameters
        ----------
        entity : str
            entity class name or "all" to remove all pivot functions.

        Raises
        ------
        ValueError
            If entity is not a recognized entity class.

        """
entity
str