Symbol

Dataclasses describing the symbols found in “lib_symbols” of .kicad_sch files.

class edea.kicad.schematic.symbol.PinElectricalType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: StrEnum

Different electrical types of a pin on a KiCad schematic.

KiCad hierarchical sheet pin

INPUT = 'input'
OUTPUT = 'output'
BIDIRECTIONAL = 'bidirectional'
TRI_STATE = 'tri_state'
PASSIVE = 'passive'
FREE = 'free'
UNSPECIFIED = 'unspecified'
POWER_IN = 'power_in'
POWER_OUT = 'power_out'
OPEN_COLLECTOR = 'open_collector'
OPEN_EMITTER = 'open_emitter'
NO_CONNECT = 'no_connect'
class edea.kicad.schematic.symbol.PinGraphicStyle(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: StrEnum

Different graphical styles for pins on a KiCad schematic symbol.

LINE = 'line'
INVERTED = 'inverted'
CLOCK = 'clock'
INVERTED_CLOCK = 'inverted_clock'
INPUT_LOW = 'input_low'
CLOCK_LOW = 'clock_low'
OUTPUT_LOW = 'output_low'
EDGE_CLOCK_HIGH = 'edge_clock_high'
NON_LOGIC = 'non_logic'
class edea.kicad.schematic.symbol.PinNumber(text: str = '', effects: ~edea.kicad.common.Effects = <factory>)

Bases: KicadSchExpr

The number of the pin.

Parameters:
  • text – The pin number as a text.

  • effects – How the pin number is displayed.

Variables:

kicad_expr_tag_name – The KiCad expression tag name for this element (“number”).

text: str = ''
effects: Effects
kicad_expr_tag_name: ClassVar[Literal['number']] = 'number'
class edea.kicad.schematic.symbol.PinName(text: str = '', effects: ~edea.kicad.common.Effects = <factory>)

Bases: KicadSchExpr

The name of the pin.

Parameters:
  • text – The pin name.

  • effects – How the pin name is displayed.

Variables:

kicad_expr_tag_name – The KiCad expression tag name for this element (“name”).

text: str = ''
effects: Effects
kicad_expr_tag_name: ClassVar[Literal['name']] = 'name'
class edea.kicad.schematic.symbol.Property(key: str = '', value: str = '', at: tuple[float, float, ~typing.Literal[0, 90, 180, 270]] = (0, 0, 0), do_not_autoplace: bool = False, show_name: bool = False, effects: ~edea.kicad.common.Effects = <factory>)

Bases: KicadSchExpr

A key value pair for storing user defined information.

Parameters:
  • key – The name of the property.

  • value – The value of the property.

  • at – The X-Y coordinates of the property.

  • do_not_autoplace – Whether the autoplace of the key is allowed or not.

  • show_name – Whether the key is shown or not.

  • effects – How the text is displayed.

Variables:

kicad_expr_tag_name – The KiCad expression tag name for this element (“property”).

key: str = ''
value: str = ''
at: tuple[float, float, Literal[0, 90, 180, 270]] = (0, 0, 0)
do_not_autoplace: bool = False
show_name: bool = False
effects: Effects
kicad_expr_tag_name: ClassVar[Literal['property']] = 'property'
class edea.kicad.schematic.symbol.PinAlternate(name: str, electrical_type: PinElectricalType = 'unspecified', graphic_style: PinGraphicStyle = 'line')

Bases: KicadSchExpr

An alternate pin.

Parameters:
  • name

  • electrical_type

  • graphic_style

Variables:

kicad_expr_tag_name – The KiCad expression tag name for this element (“alternate”).

name: str
electrical_type: PinElectricalType = 'unspecified'
graphic_style: PinGraphicStyle = 'line'
kicad_expr_tag_name: ClassVar[Literal['alternate']] = 'alternate'
class edea.kicad.schematic.symbol.Pin(electrical_type: ~edea.kicad.schematic.symbol.PinElectricalType = 'unspecified', graphic_style: ~edea.kicad.schematic.symbol.PinGraphicStyle = 'line', at: tuple[float, float, ~typing.Literal[0, 90, 180, 270]] = (0, 0, 0), length: float = 0, hide: bool = False, name: ~edea.kicad.schematic.symbol.PinName = <factory>, number: ~edea.kicad.schematic.symbol.PinNumber = <factory>, alternates: list[~edea.kicad.schematic.symbol.PinAlternate] = <factory>)

Bases: KicadSchExpr

A pin.

Parameters:
  • at – The X-Y coordinates and the rotation degree of the pin

  • length – The length of the pin.

  • hide – Whether the pin’s text is hidden or not.

  • name – The name of the pin.

  • number – The number of the pin.

  • alternates – A list of PinAlternate.

electrical_type: PinElectricalType = 'unspecified'
graphic_style: PinGraphicStyle = 'line'
at: tuple[float, float, Literal[0, 90, 180, 270]] = (0, 0, 0)
length: float = 0
hide: bool = False
name: PinName
number: PinNumber
alternates: list[PinAlternate]
kicad_expr_tag_name: ClassVar[Literal['pin']] = 'pin'
class edea.kicad.schematic.symbol.PinNameSettings(offset: float = 0, hide: bool = False)

Bases: KicadSchExpr

Pin’s name settings.

param offset:

The pin name offset for all pin names of the symbol. If not defined, the pin name offset is 0.508mm (0.020”).

param hide:

Whether the pin’s name is hidden or not.

cvar kicad_expr_tag_name:

The KiCad expression tag name for this element (“pin_names”).

offset: float = 0
hide: bool = False
kicad_expr_tag_name: ClassVar[Literal['pin_names']] = 'pin_names'
class edea.kicad.schematic.symbol.PinNumberSettings(hide: bool = False)

Bases: KicadSchExpr

Pins’ numbers settings.

Parameters:

hide – Whether the pin’s number is hidden or not.

Variables:

kicad_expr_tag_name – The KiCad expression tag name for this element (“pin_numbers”).

hide: bool = False
kicad_expr_tag_name: ClassVar[Literal['pin_numbers']] = 'pin_numbers'
class edea.kicad.schematic.symbol.SymbolGraphicText(private: bool = False, text: str = '', at: tuple[float, float, int] = (0, 0, 0), effects: ~edea.kicad.common.Effects = <factory>)

Bases: KicadSchExpr

A graphic text element in a KiCad symbol.

Parameters:
  • private – Whether the text is private or public.

  • text – The text content.

  • at – The X-Y coordinates and rotation angle of the text.

  • effects – How the text is displayed.

Variables:

kicad_expr_tag_name – The KiCad expression tag name for this element (“text”).

private: bool = False
text: str = ''
at: tuple[float, float, int] = (0, 0, 0)
effects: Effects
kicad_expr_tag_name: ClassVar[Literal['text']] = 'text'
class edea.kicad.schematic.symbol.SymbolGraphicTextBox(text: str = '', at: tuple[float, float, ~typing.Literal[0, 90, 180, 270]] = (0, 0, 0), size: tuple[float, float] = (0, 0), stroke: ~edea.kicad.common.Stroke = <factory>, fill: ~edea.kicad.schematic.shapes.FillSimple | ~edea.kicad.schematic.shapes.FillColor | ~edea.kicad.schematic.shapes.FillTypeColor = <factory>, effects: ~edea.kicad.common.Effects = <factory>)

Bases: KicadSchExpr

A graphic text box element in a KiCad symbol.

Parameters:
  • text – The text content.

  • at – The X-Y coordinates and rotation angle of the text box.

  • size – The size of the text box.

  • stroke – The stroke style of the text box.

  • fill – The fill style of the text box.

  • effects – How the text box is displayed.

Variables:

kicad_expr_tag_name – The KiCad expression tag name for this element (“text_box”).

text: str = ''
at: tuple[float, float, Literal[0, 90, 180, 270]] = (0, 0, 0)
size: tuple[float, float] = (0, 0)
stroke: Stroke
fill: FillSimple | FillColor | FillTypeColor
effects: Effects
kicad_expr_tag_name: ClassVar[Literal['text_box']] = 'text_box'
class edea.kicad.schematic.symbol.SubSymbol(name: str, unit_name: str | None = None, polylines: list[~edea.kicad.schematic.shapes.Polyline] = <factory>, text_items: list[~edea.kicad.schematic.symbol.SymbolGraphicText] = <factory>, rectangles: list[~edea.kicad.schematic.shapes.Rectangle] = <factory>, text_boxes: list[~edea.kicad.schematic.symbol.SymbolGraphicTextBox] = <factory>, circles: list[~edea.kicad.schematic.shapes.Circle] = <factory>, arcs: list[~edea.kicad.schematic.shapes.Arc] = <factory>, pins: list[~edea.kicad.schematic.symbol.Pin] = <factory>, beziers: list[~edea.kicad.schematic.shapes.Bezier] = <factory>)

Bases: KicadSchExpr

A sub-symbol within a KiCad symbol.

Parameters:
  • name – The name of the sub-symbol.

  • polylines – A list of Polyline in the sub-symbol.

  • text_items – A list of SymbolGraphicText in the sub-symbol.

  • rectangles – A list of Rectangle in the sub-symbol.

  • text_boxes – A list of SymbolGraphicTextBox in the sub-symbol.

  • circles – A list of Circle in the sub-symbol.

  • arcs – A list of Arc in the sub-symbol.

  • pins – A list of Pin in the sub-symbol.

  • beziers – A list of Bezier s in the sub-symbol.

Variables:

kicad_expr_tag_name – The KiCad expression tag name for this element (“symbol”).

name: str
unit_name: str | None = None
polylines: list[Polyline]
text_items: list[SymbolGraphicText]
rectangles: list[Rectangle]
text_boxes: list[SymbolGraphicTextBox]
circles: list[Circle]
arcs: list[Arc]
pins: list[Pin]
beziers: list[Bezier]
kicad_expr_tag_name: ClassVar[Literal['symbol']] = 'symbol'
class edea.kicad.schematic.symbol.LibSymbol(name: str, properties: list[~edea.kicad.schematic.symbol.Property] = <factory>, power: bool = False, pin_numbers: ~edea.kicad.schematic.symbol.PinNumberSettings = <factory>, pin_names: ~edea.kicad.schematic.symbol.PinNameSettings = <factory>, exclude_from_sim: bool | None = None, in_bom: bool = True, on_board: bool = True, pins: list[~edea.kicad.schematic.symbol.Pin] = <factory>, symbols: list[~edea.kicad.schematic.symbol.SubSymbol] = <factory>, polylines: list[~edea.kicad.schematic.shapes.Polyline] = <factory>, text_items: list[~edea.kicad.schematic.symbol.SymbolGraphicText] = <factory>, rectangles: list[~edea.kicad.schematic.shapes.Rectangle] = <factory>, circles: list[~edea.kicad.schematic.shapes.Circle] = <factory>, arcs: list[~edea.kicad.schematic.shapes.Arc] = <factory>)

Bases: KicadSchExpr

A library symbol in KiCad.

kiCad library symbol

Parameters:
  • name – The name of the library symbol.

  • properties – A list of properties of the library symbol.

  • power – Whether the symbol represents power or not.

  • pin_numbers – The settings for pin numbers in the symbol.

  • pin_names – The settings for pin names in the symbol.

  • in_bom – Whether the symbol is included in the BOM or not.

  • on_board – Whether the symbol is on the board or not.

  • pins – A list of pins in the symbol.

  • symbols – A list of sub-symbols in the symbol.

  • polylines – A lst of polylines in the symbol.

  • text_items – A list of graphic text items in the symbol.

  • rectangles – A list of rectangles in the symbol.

  • circles – A list of circles in the symbol.

  • arcs – A list of arcs in the symbol.

Variables:

kicad_expr_tag_name – The KiCad expression tag name for this element (“symbol”).

name: str
properties: list[Property]
power: bool = False
pin_numbers: PinNumberSettings
pin_names: PinNameSettings
exclude_from_sim: bool | None = None
in_bom: bool = True
on_board: bool = True
pins: list[Pin]
symbols: list[SubSymbol]
polylines: list[Polyline]
text_items: list[SymbolGraphicText]
rectangles: list[Rectangle]
circles: list[Circle]
arcs: list[Arc]
kicad_expr_tag_name: ClassVar[Literal['symbol']] = 'symbol'