get_component_labels¶
- autoeis.parser.get_component_labels(circuit: str, types: list[str] | None = None) list[str] ¶
Returns a list of labels for all components in a circuit string.
- Parameters:
circuit (str) – CDC string representation of the input circuit. See here for details.
types (list[str], optional) – List of component types to filter by. Default is None.
- Returns:
A list of component labels.
- Return type:
list[str]
Examples
>>> get_component_labels("R1-[R2,P4]") ['R1', 'R2', 'P4'] >>> get_component_labels("R1-[R2,P4]", types=["R"]) ['R1', 'R2']