Parsed Diagram
src.drawpyo.drawio_import.drawio_parser.ParsedDiagram
dataclass
High-level diagram representation with convenient access methods.
Source code in src/drawpyo/drawio_import/drawio_parser.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |
element_count
property
Total number of elements (shapes + edges).
get_by_id(cell_id)
Get an element by its Draw.io cell ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cell_id
|
str
|
The Draw.io cell ID |
required |
Returns:
| Type | Description |
|---|---|
Optional[DiagramBase]
|
The diagram element or None if not found |
Source code in src/drawpyo/drawio_import/drawio_parser.py
22 23 24 25 26 27 28 29 30 31 | |