motleycrew.storage.graph_node
Classes
Base class for describing nodes in the graph. |
- class motleycrew.storage.graph_node.MotleyGraphNode
Bases:
BaseModel,ABCBase class for describing nodes in the graph.
- __label__
Label of the node in the graph. If not set, the class name is used.
- Type:
str | None
- __graph_store__
Graph store in which the node is stored.
- Type:
MotleyGraphStore | None
- property id: Any | None
Identifier of the node in the graph.
The identifier is unique among nodes of the same label. If the node is not inserted in the graph, the identifier is None.
- property is_inserted: bool
Whether the node is inserted in the graph.
- classmethod get_label() str
Get the label of the node.
Labels can be viewed as node types in the graph. Generally, the label is the class name, but it can be overridden by setting the __label__ attribute.
- Returns:
Label of the node.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].