converter
converter ¶
Base converter class for lineage graph exports.
GraphConverter ¶
Bases: ABC
Abstract base converter for lineage graph export.
Converters transform LineageGraph (format-agnostic data model) into specific export formats (Mermaid, Neo4j, GraphML, etc.).
All conversion is synchronous - operates on pre-loaded graph data.
convert
abstractmethod
¶
convert(graph: LineageGraph, **options) -> Any
Convert graph to target format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
graph
|
LineageGraph
|
LineageGraph with pre-loaded nodes and edges |
required |
**options
|
Format-specific conversion options |
{}
|
Returns:
| Type | Description |
|---|---|
Any
|
Format-specific output (MermaidDiagram, Cypher queries, etc.) |
Source code in src/crew_dcs/integrations/graphs/converter.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |
export_to_file
abstractmethod
¶
export_to_file(
output: Any, file_path: str, **options
) -> None
Export converted output to file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output
|
Any
|
Result from convert() method |
required |
file_path
|
str
|
Destination file path |
required |
**options
|
Format-specific export options |
{}
|
Source code in src/crew_dcs/integrations/graphs/converter.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 | |