msticpy.datamodel.entities.entity_graph module

Entity Graph classes.

class msticpy.datamodel.entities.entity_graph.Edge(source, target, attrs=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, value)

Add an edge attribute.

Parameters:
  • name (str)

  • value (Any)

attrs: dict[str, Any]
source: Node
target: Node
class msticpy.datamodel.entities.entity_graph.Node

Bases: object

Entity node.

Initialize the node.

add_edge(target, edge_attrs=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

edges: set[Edge]
has_edge(other)

Return True if node has an edge with other.