msticpy.datamodel.entities.entity_graph module

Entity Graph classes.

class msticpy.datamodel.entities.entity_graph.Edge(source: Node, target: Node, attrs: Dict[str, Any] | None = None)

Bases: object

Entity edge class.

Create a new edge between source and target.

Parameters:
  • source (Node) – Source node.

  • target (Node) – Target node.

  • attrs (Dict[str, Any], optional) – Dictionary of name/value edge attributes, by default None

add_attr(name: str, value: Any)

Add an edge attribute.

class msticpy.datamodel.entities.entity_graph.Node

Bases: object

Entity node.

Initialize the node.

add_edge(target: Node, edge_attrs: Dict[str, Any] | None = None)

Add an edge between self and target.

Parameters:
  • target (Node) – Target node.

  • edge_attrs (Optional[Dict[str, Any]], optional) – Attributes to assign to new edge, by default None

has_edge(other)

Return True if node has an edge with other.