noctis.data_architecture.datamodel.Relationship¶
- pydantic model noctis.data_architecture.datamodel.Relationship[source]¶
Represents a relationship between two nodes in a graph.
Show JSON schema
{ "title": "Relationship", "description": "Represents a relationship between two nodes in a graph.", "type": "object", "properties": { "relationship_type": { "pattern": "^[A-Z\\d_-]+$", "title": "Relationship Type", "type": "string" }, "start_node": { "$ref": "#/$defs/Node" }, "end_node": { "$ref": "#/$defs/Node" }, "properties": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": {}, "title": "Properties" } }, "$defs": { "Node": { "description": "Represents a node in a graph with a unique identifier and optional properties.", "properties": { "node_label": { "pattern": "^[A-Z][\\w\\-]*$", "title": "Node Label", "type": "string" }, "uid": { "pattern": "^[A-Z]{0,3}{1,2}\\d+$", "title": "Uid", "type": "string" }, "properties": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": {}, "title": "Properties" } }, "required": [ "node_label", "uid" ], "title": "Node", "type": "object" } }, "required": [ "relationship_type", "start_node", "end_node" ] }
- Config:
populate_by_name: bool = True
frozen: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field properties: Annotated[dict | None, FieldInfo(annotation=NoneType, required=False, default={})] = {}¶
- field relationship_type: StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern=^[A-Z\d_-]+$)] [Required]¶
- Constraints:
pattern = ^[A-Zd_-]+$
- property start_end_uids: tuple[str, str]¶