Project

Dataclasses describing the contents of .kicad_pro files.

class edea.kicad.project.BaseModel(**extra_data: Any)

Bases: BaseModel

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_fields: ClassVar[Dict[str, FieldInfo]] = {}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.Dimensions(*, arrow_length: int, extension_offset: int, keep_text_aligned: bool, suppress_zeroes: bool, text_position: int, units_format: int, **extra_data: Any)

Bases: BaseModel

The dimensions configuration.

Parameters:
  • arrow_length – The length of the arrow.

  • extension_offset – The offset for extension.

  • keep_text_aligned – A flag to keep text aligned.

  • suppress_zeroes – A flag to suppress zeroes.

  • text_position – The position of the text.

  • units_format – The format of the units.

arrow_length: int
extension_offset: int
keep_text_aligned: bool
suppress_zeroes: bool
text_position: int
units_format: int
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'arrow_length': FieldInfo(annotation=int, required=True), 'extension_offset': FieldInfo(annotation=int, required=True), 'keep_text_aligned': FieldInfo(annotation=bool, required=True), 'suppress_zeroes': FieldInfo(annotation=bool, required=True), 'text_position': FieldInfo(annotation=int, required=True), 'units_format': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.Pads(*, drill: float, height: float, width: float, **extra_data: Any)

Bases: BaseModel

The pad configuration.

Parameters:
  • drill – The drill size.

  • height – The height of the pad.

  • width – The width of the pad.

drill: float
height: float
width: float
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'drill': FieldInfo(annotation=float, required=True), 'height': FieldInfo(annotation=float, required=True), 'width': FieldInfo(annotation=float, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.Zones(*, field_45_degree_only: bool | None = None, min_clearance: float, **extra_data: Any)

Bases: BaseModel

The zone configuration.

Parameters:
  • field_45_degree_only – A flag for 45-degree clearance.

  • min_clearance – The minimum clearance.

field_45_degree_only: bool | None
min_clearance: float
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'field_45_degree_only': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None, alias='45_degree_only', alias_priority=2), 'min_clearance': FieldInfo(annotation=float, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.Defaults(*, board_outline_line_width: float | None = None, copper_line_width: float | None = None, copper_text_italic: bool | None = None, copper_text_size_h: float | None = None, copper_text_size_v: float | None = None, copper_text_thickness: float | None = None, copper_text_upright: bool | None = None, courtyard_line_width: float | None = None, dimension_precision: int | None = None, dimension_units: int | None = None, dimensions: Dimensions | None = None, fab_line_width: float | None = None, fab_text_italic: bool | None = None, fab_text_size_h: float | None = None, fab_text_size_v: float | None = None, fab_text_thickness: float | None = None, fab_text_upright: bool | None = None, other_line_width: float | None = None, other_text_italic: bool | None = None, other_text_size_h: float | None = None, other_text_size_v: float | None = None, other_text_thickness: float | None = None, other_text_upright: bool | None = None, pads: Pads | None = None, silk_line_width: float | None = None, silk_text_italic: bool | None = None, silk_text_size_h: float | None = None, silk_text_size_v: float | None = None, silk_text_thickness: float | None = None, silk_text_upright: bool | None = None, zones: Zones | None = None, **extra_data: Any)

Bases: BaseModel

Various configuration options related to the visual appearance of a PCB layout.

Parameters:
  • board_outline_line_width – The board outline line width.

  • copper_line_width – The copper traces line width.

  • copper_text_italic – Whether copper text should be italic or not.

  • copper_text_size_h – The horizontal size of copper text.

  • copper_text_size_v – The vertical size of copper text.

  • copper_text_thickness – The thickness of copper text.

  • copper_text_upright – Whether copper text should be upright or not.

  • courtyard_line_width – The width of the line used to draw component courtyards.

  • dimension_precision – The precision (number of decimal places) used for dimensions.

  • dimension_units – The mesurement units (e.g., millimeters, inches) used for dimensions.

  • dimensions – Instance of the Dimensions representing dimensions configuration.

  • fab_line_width – The width of the line used to draw fabrication lines.

  • fab_text_italic – Whether fabrication text should be italicized or not.

  • fab_text_size_h – The horizontal size of fabrication text.

  • fab_text_size_v – The vertical size of fabrication text.

  • fab_text_thickness – The thickness of fabrication text.

  • fab_text_upright – Whether fabrication text should be upright or not.

  • other_line_width – The width of the line used for miscellaneous features.

  • other_text_italic – Whether miscellaneous text should be italicized or not.

  • other_text_size_h – The horizontal size of miscellaneous text.

  • other_text_size_v – The vertical size of miscellaneous text.

  • other_text_thickness – The thickness of miscellaneous text.

  • other_text_upright – Whether miscellaneous text should be upright or not.

  • pads – Instance of the Pads, representing pad configuration.

  • silk_line_width – The width of the line used for silkscreen features.

  • silk_text_italic – Whether the silkscreen text should be italicized or not.

  • silk_text_size_h – The horizontal size of silkscreen text.

  • silk_text_size_v – The vertical size of silkscreen text.

  • silk_text_thickness – The thickness of silkscreen text.

  • silk_text_upright – Whether the silkscreen text should be upright or not.

  • zones – Instance of Zones, representing zone configuration.

board_outline_line_width: float | None
copper_line_width: float | None
copper_text_italic: bool | None
copper_text_size_h: float | None
copper_text_size_v: float | None
copper_text_thickness: float | None
copper_text_upright: bool | None
courtyard_line_width: float | None
dimension_precision: int | None
dimension_units: int | None
dimensions: Dimensions | None
fab_line_width: float | None
fab_text_italic: bool | None
fab_text_size_h: float | None
fab_text_size_v: float | None
fab_text_thickness: float | None
fab_text_upright: bool | None
other_line_width: float | None
other_text_italic: bool | None
other_text_size_h: float | None
other_text_size_v: float | None
other_text_thickness: float | None
other_text_upright: bool | None
pads: Pads | None
silk_line_width: float | None
silk_text_italic: bool | None
silk_text_size_h: float | None
silk_text_size_v: float | None
silk_text_thickness: float | None
silk_text_upright: bool | None
zones: Zones | None
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'board_outline_line_width': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'copper_line_width': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'copper_text_italic': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'copper_text_size_h': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'copper_text_size_v': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'copper_text_thickness': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'copper_text_upright': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'courtyard_line_width': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'dimension_precision': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'dimension_units': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'dimensions': FieldInfo(annotation=Union[Dimensions, NoneType], required=False, default=None), 'fab_line_width': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'fab_text_italic': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'fab_text_size_h': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'fab_text_size_v': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'fab_text_thickness': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'fab_text_upright': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'other_line_width': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'other_text_italic': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'other_text_size_h': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'other_text_size_v': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'other_text_thickness': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'other_text_upright': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'pads': FieldInfo(annotation=Union[Pads, NoneType], required=False, default=None), 'silk_line_width': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'silk_text_italic': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'silk_text_size_h': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'silk_text_size_v': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'silk_text_thickness': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'silk_text_upright': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'zones': FieldInfo(annotation=Union[Zones, NoneType], required=False, default=None)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.Meta(*, filename: str | None = None, version: int, **extra_data: Any)

Bases: BaseModel

Stores metadata associated with project files.

Parameters:
  • filename – The file name.

  • version – The version kicad format.

filename: str | None
version: int
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'filename': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'version': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.Rules(*, allow_blind_buried_vias: bool | None = None, allow_microvias: bool | None = None, max_error: float | None = None, min_clearance: float | None = None, min_connection: float | None = None, min_copper_edge_clearance: float | None = None, solder_mask_clearance: float | None = None, solder_mask_min_width: float | None = None, solder_paste_clearance: float | None = None, solder_paste_margin_ratio: float | None = None, min_hole_clearance: float | None = None, min_hole_to_hole: float | None = None, min_microvia_diameter: float | None = None, min_microvia_drill: float | None = None, min_resolved_spokes: int | None = None, min_silk_clearance: float | None = None, min_text_height: float | None = None, min_text_thickness: float | None = None, min_through_hole_diameter: float | None = None, min_track_width: float | None = None, min_via_annular_width: float | None = None, min_via_diameter: float | None = None, solder_mask_to_copper_clearance: float | None = None, use_height_for_length_calcs: bool | None = None, **extra_data: Any)

Bases: BaseModel

Various design rules used for validating a PCB layout.

Parameters:
  • allow_blind_buried_vias – Whether blind and buried vias are allowed or not.

  • allow_microvias – Whether microvias are allowed or not.

  • max_error – The maximum allowed error during design rule checks.

  • min_clearance – The minimum clearance between objects on the PCB.

  • min_connection – The minimum allowed size for connections (e.g., traces).

  • min_copper_edge_clearance – The minimum clearance between copper features and other objects.

  • solder_mask_clearance – The clearance between solder mask and other objects.

  • solder_mask_min_width – The minimum width of solder mask features.

  • solder_paste_clearance – The clearance between solder paste and other objects.

  • solder_paste_margin_ratio – The ratio defining the margin for solder paste application.

  • min_hole_clearance – The minimum clearance between holes.

  • min_hole_to_hole – The minimum distance between center points of holes.

  • min_microvia_diameter – The minimum diameter for microvias.

  • min_microvia_drill – The minimum drill size for microvias.

  • min_resolved_spokes – The minimum number of spokes allowed in rounded corners.

  • min_silk_clearance – The minimum clearance between silkscreen features and other objects.

  • min_text_height – The minimum height of text on the PCB.

  • min_text_thickness – The minimum thickness of text on the PCB.

  • min_through_hole_diameter – The minimum diameter for through-hole pads.

  • min_track_width – The minimum allowed width for tracks (traces).

  • min_via_annular_width – The minimum width of the annular ring around vias.

  • min_via_diameter – The minimum diameter for vias.

  • solder_mask_to_copper_clearance – The clearance between solder mask and copper features.

  • use_height_for_length_calcs – Whether to use via height for length calculations or not.

allow_blind_buried_vias: bool | None
allow_microvias: bool | None
max_error: float | None
min_clearance: float | None
min_connection: float | None
min_copper_edge_clearance: float | None
solder_mask_clearance: float | None
solder_mask_min_width: float | None
solder_paste_clearance: float | None
solder_paste_margin_ratio: float | None
min_hole_clearance: float | None
min_hole_to_hole: float | None
min_microvia_diameter: float | None
min_microvia_drill: float | None
min_resolved_spokes: int | None
min_silk_clearance: float | None
min_text_height: float | None
min_text_thickness: float | None
min_through_hole_diameter: float | None
min_track_width: float | None
min_via_annular_width: float | None
min_via_diameter: float | None
solder_mask_to_copper_clearance: float | None
use_height_for_length_calcs: bool | None
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'allow_blind_buried_vias': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'allow_microvias': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'max_error': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'min_clearance': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'min_connection': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'min_copper_edge_clearance': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'min_hole_clearance': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'min_hole_to_hole': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'min_microvia_diameter': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'min_microvia_drill': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'min_resolved_spokes': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'min_silk_clearance': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'min_text_height': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'min_text_thickness': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'min_through_hole_diameter': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'min_track_width': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'min_via_annular_width': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'min_via_diameter': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'solder_mask_clearance': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'solder_mask_min_width': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'solder_mask_to_copper_clearance': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'solder_paste_clearance': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'solder_paste_margin_ratio': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'use_height_for_length_calcs': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.TeardropOption(*, td_allow_use_two_tracks: bool | None = None, td_curve_segcount: int | None = None, td_on_pad_in_zone: bool | None = None, td_onpadsmd: bool | None = None, td_onroundshapesonly: bool | None = None, td_ontrackend: bool | None = None, td_onviapad: bool | None = None, **extra_data: Any)

Bases: BaseModel

The options controlling the generation of teardrops on the PCB layout.

Parameters:
  • td_allow_use_two_tracks – Whether two tracks can be used to form a teardrop or not.

  • td_curve_segcount – The number of segments used to approximate a curved teardrop shape.

  • td_on_pad_in_zone – Whether teardrops are allowed on pads within zones or not.

  • td_onpadsmd – Whether if teardrops are allowed on SMD pads or not.

  • td_onroundshapesonly – Whether teardrops are only applied to round shapes or not.

  • td_ontrackend – Whether teardrops are applied on track ends or not.

  • td_onviapad – Whether teardrops are allowed on via pads or not.

td_allow_use_two_tracks: bool | None
td_curve_segcount: int | None
td_on_pad_in_zone: bool | None
td_onpadsmd: bool | None
td_onroundshapesonly: bool | None
td_ontrackend: bool | None
td_onviapad: bool | None
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'td_allow_use_two_tracks': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'td_curve_segcount': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'td_on_pad_in_zone': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'td_onpadsmd': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'td_onroundshapesonly': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'td_ontrackend': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'td_onviapad': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.TeardropParameter(*, td_curve_segcount: int, td_height_ratio: float, td_length_ratio: float, td_maxheight: float, td_maxlen: float, td_target_name: str, td_width_to_size_filter_ratio: float | None = None, **extra_data: Any)

Bases: BaseModel

The parameters used to control the shape and size of teardrops.

Parameters:
  • td_curve_segcount – The number of segments used to approximate a curved teardrop shape.

  • td_height_ratio – The ratio of teardrop height to pad size.

  • td_length_ratio – The ratio of teardrop length to pad size.

  • td_maxheight – The maximum allowed height of a teardrop.

  • td_maxlen – The maximum allowed length of a teardrop.

  • td_target_name – The name of the target layer for teardrops.

  • td_width_to_size_filter_ratio – The ratio of teardrop width to pad size for filtering.

td_curve_segcount: int
td_height_ratio: float
td_length_ratio: float
td_maxheight: float
td_maxlen: float
td_target_name: str
td_width_to_size_filter_ratio: float | None
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'td_curve_segcount': FieldInfo(annotation=int, required=True), 'td_height_ratio': FieldInfo(annotation=float, required=True), 'td_length_ratio': FieldInfo(annotation=float, required=True), 'td_maxheight': FieldInfo(annotation=float, required=True), 'td_maxlen': FieldInfo(annotation=float, required=True), 'td_target_name': FieldInfo(annotation=str, required=True), 'td_width_to_size_filter_ratio': FieldInfo(annotation=Union[float, NoneType], required=False, default=None)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.ViaDimension(*, diameter: float, drill: float, **extra_data: Any)

Bases: BaseModel

The diameter and drill size of a via.

Parameters:
  • diameter – The diameter of the via pad.

  • drill – The drill size of the via hole.

diameter: float
drill: float
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'diameter': FieldInfo(annotation=float, required=True), 'drill': FieldInfo(annotation=float, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.DesignSettings(*, apply_defaults_to_field: bool | None = None, apply_defaults_to_shapes: bool | None = None, apply_defaults_to_fp_text: bool | None = None, defaults: Defaults | None = None, diff_pair_dimensions: list, drc_exclusions: list, meta: Meta | None = None, rule_severities: dict[str, Any] | None = None, rule_severitieslegacy_courtyards_overlap: bool | None = None, rule_severitieslegacy_no_courtyard_defined: bool | None = None, rules: Rules | None = None, teardrop_options: list[TeardropOption] | None = None, teardrop_parameters: list[TeardropParameter] | None = None, track_widths: list[float], via_dimensions: list[ViaDimension], zones_allow_external_fillets: bool | None = None, zones_use_no_outline: bool | None = None, **extra_data: Any)

Bases: BaseModel

Various settings used for configuring the design process.

Parameters:
  • apply_defaults_to_field – Whether default values should be applied to fields or not.

  • apply_defaults_to_shapes – Whether default values should be applied to shapes or not.

  • apply_defaults_to_fp_text – Whether default values should be applied to footprint text or not.

  • defaults – An Instance of Defaults.

  • diff_pair_dimensions – A list of differential pair dimension settings.

  • drc_exclusions – A list of DRC (Design Rule Checks) exclusion rules.

  • meta – An instance of Meta.

  • rule_severities – Dictionary defining severities for different design rules.

  • rule_severitieslegacy_courtyards_overlap – Whether legacy courtyard overlap severity is used or not.

  • rule_severitieslegacy_no_courtyard_defined – Whether legacy no courtyard defined severity is used or not.

  • rules – An instance of Rules.

  • teardrop_options – List of TeardropOption defining teardrop options.

  • teardrop_parameters – List of TeardropParameter defining teardrop parameters.

  • track_widths – List of allowed track (trace) widths.

  • via_dimensions – List of ViaDimension defining via dimensions.

  • zones_allow_external_fillets – Whether external fillets are allowed on zones or not.

  • zones_use_no_outline – Whether zones are allowed without an outline or not.

apply_defaults_to_field: bool | None
apply_defaults_to_shapes: bool | None
apply_defaults_to_fp_text: bool | None
defaults: Defaults | None
diff_pair_dimensions: list
drc_exclusions: list
meta: Meta | None
rule_severities: dict[str, Any] | None
rule_severitieslegacy_courtyards_overlap: bool | None
rule_severitieslegacy_no_courtyard_defined: bool | None
rules: Rules | None
teardrop_options: list[TeardropOption] | None
teardrop_parameters: list[TeardropParameter] | None
track_widths: list[float]
via_dimensions: list[ViaDimension]
zones_allow_external_fillets: bool | None
zones_use_no_outline: bool | None
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'apply_defaults_to_field': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'apply_defaults_to_fp_text': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'apply_defaults_to_shapes': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'defaults': FieldInfo(annotation=Union[Defaults, NoneType], required=False, default=None), 'diff_pair_dimensions': FieldInfo(annotation=list, required=True), 'drc_exclusions': FieldInfo(annotation=list, required=True), 'meta': FieldInfo(annotation=Union[Meta, NoneType], required=False, default=None), 'rule_severities': FieldInfo(annotation=Union[dict[str, Any], NoneType], required=False, default=None), 'rule_severitieslegacy_courtyards_overlap': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'rule_severitieslegacy_no_courtyard_defined': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'rules': FieldInfo(annotation=Union[Rules, NoneType], required=False, default=None), 'teardrop_options': FieldInfo(annotation=Union[list[TeardropOption], NoneType], required=False, default=None), 'teardrop_parameters': FieldInfo(annotation=Union[list[TeardropParameter], NoneType], required=False, default=None), 'track_widths': FieldInfo(annotation=list[float], required=True), 'via_dimensions': FieldInfo(annotation=list[ViaDimension], required=True), 'zones_allow_external_fillets': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'zones_use_no_outline': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.Board(*, field_3dviewports: list | None = None, design_settings: DesignSettings | None = None, layer_presets: list | None = None, viewports: list | None = None, **extra_data: Any)

Bases: BaseModel

A PCB design within the context of a Cvpcb file.

Parameters:
  • field_3dviewports – A list of 3D viewport definitions.

  • design_settings – An instance of DesignSettings.

  • layer_presets – A list of layer preset definitions.

  • viewports – A list of viewport definitions.

field_3dviewports: list | None
design_settings: DesignSettings | None
layer_presets: list | None
viewports: list | None
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'design_settings': FieldInfo(annotation=Union[DesignSettings, NoneType], required=False, default=None), 'field_3dviewports': FieldInfo(annotation=Union[list, NoneType], required=False, default=None, alias='3dviewports', alias_priority=2), 'layer_presets': FieldInfo(annotation=Union[list, NoneType], required=False, default=None), 'viewports': FieldInfo(annotation=Union[list, NoneType], required=False, default=None)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.Cvpcb(*, equivalence_files: list, **extra_data: Any)

Bases: BaseModel

The root element of a Cvpcb file containing a PCB design.

Parameters:

equivalence_files – A list of equivalence files associated with the PCB design.

equivalence_files: list
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'equivalence_files': FieldInfo(annotation=list, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.Erc(*, erc_exclusions: list, meta: Meta, pin_map: list[list[int]], rule_severities: dict[str, Any], **extra_data: Any)

Bases: BaseModel

Electrical Rule Checking (ERC) settings.

Parameters:
  • erc_exclusions – A list of ERC exclusion rules.

  • meta – An instance of Meta.

  • pin_map – A list of lists representing pin mappings.

  • rule_severities – Dictionary defining severities for different ERC rules.

erc_exclusions: list
meta: Meta
pin_map: list[list[int]]
rule_severities: dict[str, Any]
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'erc_exclusions': FieldInfo(annotation=list, required=True), 'meta': FieldInfo(annotation=Meta, required=True), 'pin_map': FieldInfo(annotation=list[list[int]], required=True), 'rule_severities': FieldInfo(annotation=dict[str, Any], required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.Libraries(*, pinned_footprint_libs: list, pinned_symbol_libs: list, **extra_data: Any)

Bases: BaseModel

Library settings for footprints and symbols.

Parameters:
  • pinned_footprint_libs – List of pinned footprint libraries.

  • pinned_symbol_libs – List of pinned symbol libraries.

pinned_footprint_libs: list
pinned_symbol_libs: list
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'pinned_footprint_libs': FieldInfo(annotation=list, required=True), 'pinned_symbol_libs': FieldInfo(annotation=list, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.Class(*, bus_width: int | None = None, clearance: float, diff_pair_gap: float, diff_pair_via_gap: float, diff_pair_width: float, line_style: int | None = None, microvia_diameter: float, microvia_drill: float, name: str, pcb_color: str | None = None, schematic_color: str | None = None, track_width: float, via_diameter: float, via_drill: float, wire_width: int | None = None, **extra_data: Any)

Bases: BaseModel

The properties associated with a design class in the PCB layout.

Parameters:
  • bus_width – The width of a bus (multiple connected tracks).

  • clearance – The clearance between objects

  • diff_pair_gap – The gap between tracks in a differential pair.

  • diff_pair_via_gap – The gap between vias in a differential pair.

  • diff_pair_width – The width of tracks in a differential pair.

  • line_style – The line style used.

  • microvia_diameter – The diameter of microvias.

  • microvia_drill – The drill size for microvias.

  • name – The name of the design class.

  • pcb_color – The color used on the PCB layout.

  • schematic_color – The color used on the schematic.

  • track_width – The default track width.

  • via_diameter – The diameter of vias.

  • via_drill – The drill size for vias.

  • wire_width – The width of wires.

bus_width: int | None
clearance: float
diff_pair_gap: float
diff_pair_via_gap: float
diff_pair_width: float
line_style: int | None
microvia_diameter: float
microvia_drill: float
name: str
pcb_color: str | None
schematic_color: str | None
track_width: float
via_diameter: float
via_drill: float
wire_width: int | None
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'bus_width': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'clearance': FieldInfo(annotation=float, required=True), 'diff_pair_gap': FieldInfo(annotation=float, required=True), 'diff_pair_via_gap': FieldInfo(annotation=float, required=True), 'diff_pair_width': FieldInfo(annotation=float, required=True), 'line_style': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'microvia_diameter': FieldInfo(annotation=float, required=True), 'microvia_drill': FieldInfo(annotation=float, required=True), 'name': FieldInfo(annotation=str, required=True), 'pcb_color': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'schematic_color': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'track_width': FieldInfo(annotation=float, required=True), 'via_diameter': FieldInfo(annotation=float, required=True), 'via_drill': FieldInfo(annotation=float, required=True), 'wire_width': FieldInfo(annotation=Union[int, NoneType], required=False, default=None)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.NetclassPattern(*, netclass: str, pattern: str, **extra_data: Any)

Bases: BaseModel

A pattern for matching netclasses in the PCB design.

Parameters:
  • netclass – The net class name to match.

  • pattern – A regular expression pattern for matching nets within the net class.

netclass: str
pattern: str
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'netclass': FieldInfo(annotation=str, required=True), 'pattern': FieldInfo(annotation=str, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.NetSettings(*, classes: list[Class], meta: Meta, net_colors: dict[str, str] | None = None, netclass_assignments: dict[str, str] | None = None, netclass_patterns: list[NetclassPattern] | None = None, **extra_data: Any)

Bases: BaseModel

Various settings related to nets (electrical connections) in the PCB design.

Parameters:
  • classes – A list of Class objects.

  • meta – An instance of Meta.

  • net_colors – Dictionary mapping net names to their corresponding colors.

  • netclass_assignments – Dictionary mapping net names to their assigned net classes.

  • netclass_patterns – A list of NetclassPattern objects.

classes: list[Class]
meta: Meta
net_colors: dict[str, str] | None
netclass_assignments: dict[str, str] | None
netclass_patterns: list[NetclassPattern] | None
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'classes': FieldInfo(annotation=list[Class], required=True), 'meta': FieldInfo(annotation=Meta, required=True), 'net_colors': FieldInfo(annotation=Union[dict[str, str], NoneType], required=False, default=None), 'netclass_assignments': FieldInfo(annotation=Union[dict[str, str], NoneType], required=False, default=None), 'netclass_patterns': FieldInfo(annotation=Union[list[NetclassPattern], NoneType], required=False, default=None)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.LastPaths(*, gencad: str, idf: str, netlist: str, specctra_dsn: str, step: str, vrml: str, **extra_data: Any)

Bases: BaseModel

Stores the paths to various generated files associated with the PCB design.

Parameters:
  • gencad – The path to the generated GenCAD file.

  • idf – The path to the generated IDF file.

  • netlist – The path to the generated netlist file.

  • specctra_dsn – The path to the generated Specctra DSN file.

  • step – The path to the generated STEP file.

  • vrml – The path to the generated VRML file.

gencad: str
idf: str
netlist: str
specctra_dsn: str
step: str
vrml: str
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'gencad': FieldInfo(annotation=str, required=True), 'idf': FieldInfo(annotation=str, required=True), 'netlist': FieldInfo(annotation=str, required=True), 'specctra_dsn': FieldInfo(annotation=str, required=True), 'step': FieldInfo(annotation=str, required=True), 'vrml': FieldInfo(annotation=str, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.Pcbnew(*, last_paths: LastPaths | None = None, page_layout_descr_file: str, **extra_data: Any)

Bases: BaseModel

The PCBnew section within a Cvpcb file.

Parameters:
  • last_paths – An instance of LastPaths.

  • page_layout_descr_file – The path to the page layout description file.

last_paths: LastPaths | None
page_layout_descr_file: str
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'last_paths': FieldInfo(annotation=Union[LastPaths, NoneType], required=False, default=None), 'page_layout_descr_file': FieldInfo(annotation=str, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.Drawing(*, dashed_lines_dash_length_ratio: float | None = None, dashed_lines_gap_length_ratio: float | None = None, default_line_thickness: float | None = None, default_text_size: float | None = None, default_bus_thickness: float | None = None, default_junction_size: float | None = None, default_wire_thickness: float | None = None, field_names: list | None = None, intersheets_ref_own_page: bool | None = None, intersheets_ref_prefix: str | None = None, intersheets_ref_short: bool | None = None, intersheets_ref_show: bool | None = None, intersheets_ref_suffix: str | None = None, junction_size_choice: int | None = None, label_size_ratio: float | None = None, pin_symbol_size: float | None = None, text_offset_ratio: float | None = None, **extra_data: Any)

Bases: BaseModel

The settings related to the visual appearance of the PCB schematic drawing.

Parameters:
  • dashed_lines_dash_length_ratio – The ratio of dash length to gap length for dashed lines.

  • dashed_lines_gap_length_ratio – The ratio of gap length to dash length for dashed lines.

  • default_line_thickness – The default thickness for lines in the schematic.

  • default_text_size – The default size for text in the schematic.

  • default_bus_thickness – The default thickness for buses (multiple connected wires) in the schematic.

  • default_junction_size – The default size for junctions (connection points) in the schematic.

  • default_wire_thickness – The default thickness for wires in the schematic.

  • field_names – List of field names displayed in the schematic.

  • intersheets_ref_own_page – Whether intersheet references point to the same page or not.

  • intersheets_ref_prefix – The prefix string used for intersheet references.

  • intersheets_ref_short – Whether intersheet references are shortened or not.

  • intersheets_ref_show – Whether if intersheet references are displayed or not.

  • intersheets_ref_suffix – The suffix string used for intersheet references.

  • junction_size_choice – The choice for the default junction size (e.g., absolute, relative).

  • label_size_ratio – The ratio of label size to element size.

  • pin_symbol_size – The size of pin symbols in the schematic.

  • text_offset_ratio – The ratio of text offset to element size.

dashed_lines_dash_length_ratio: float | None
dashed_lines_gap_length_ratio: float | None
default_line_thickness: float | None
default_text_size: float | None
default_bus_thickness: float | None
default_junction_size: float | None
default_wire_thickness: float | None
field_names: list | None
intersheets_ref_own_page: bool | None
intersheets_ref_prefix: str | None
intersheets_ref_short: bool | None
intersheets_ref_show: bool | None
intersheets_ref_suffix: str | None
junction_size_choice: int | None
label_size_ratio: float | None
pin_symbol_size: float | None
text_offset_ratio: float | None
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'dashed_lines_dash_length_ratio': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'dashed_lines_gap_length_ratio': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'default_bus_thickness': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'default_junction_size': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'default_line_thickness': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'default_text_size': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'default_wire_thickness': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'field_names': FieldInfo(annotation=Union[list, NoneType], required=False, default=None), 'intersheets_ref_own_page': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'intersheets_ref_prefix': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'intersheets_ref_short': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'intersheets_ref_show': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'intersheets_ref_suffix': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'junction_size_choice': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'label_size_ratio': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'pin_symbol_size': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'text_offset_ratio': FieldInfo(annotation=Union[float, NoneType], required=False, default=None)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.Ngspice(*, fix_include_paths: bool | None = None, fix_passive_vals: bool | None = None, meta: Meta | None = None, model_mode: int | None = None, workbook_filename: str | None = None, **extra_data: Any)

Bases: BaseModel

The settings related to NGSPICE simulation for the PCB design.

Parameters:
  • fix_include_paths – Whether to fix include paths for NGSPICE simulations or not.

  • fix_passive_vals – Whether to fix passive component values for NGSPICE simulations or not.

  • meta – An instance of Meta.

  • model_mode – The mode used for NGSPICE model handling.

  • workbook_filename – The file name of the NGSPICE workbook.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'protected_namespaces': (), 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

fix_include_paths: bool | None
fix_passive_vals: bool | None
meta: Meta | None
model_mode: int | None
workbook_filename: str | None
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_fields: ClassVar[Dict[str, FieldInfo]] = {'fix_include_paths': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'fix_passive_vals': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'meta': FieldInfo(annotation=Union[Meta, NoneType], required=False, default=None), 'model_mode': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'workbook_filename': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.ProjectSchematic(*, annotate_start_num: int | None = None, drawing: Drawing | None = None, legacy_lib_dir: str, legacy_lib_list: list, meta: Meta | None = None, net_format_name: str | None = None, ngspice: Ngspice | None = None, page_layout_descr_file: str | None = None, plot_directory: str | None = None, spice_adjust_passive_values: bool | None = None, spice_current_sheet_as_root: bool | None = None, spice_external_command: str | None = None, spice_model_current_sheet_as_root: bool | None = None, spice_save_all_currents: bool | None = None, spice_save_all_voltages: bool | None = None, subpart_first_id: int | None = None, subpart_id_separator: int | None = None, **extra_data: Any)

Bases: BaseModel

The settings related to the project schematic associated with the project file.

Parameters:
  • annotate_start_num – The starting number for schematic annotations.

  • drawing – An instance of Drawing.

  • legacy_lib_dir – Directory containing legacy schematic symbol libraries.

  • legacy_lib_list – A list of legacy schematic symbol libraries to use.

  • meta – Reference to a Meta object containing PCB layout metadata.

  • net_format_name – The name of the netlist format for the schematic.

  • ngspice – An instance of Ngspice.

  • page_layout_descr_file – The path to the schematic page layout description file.

  • plot_directory – Directory for storing simulation plots.

  • spice_adjust_passive_values – Whether to adjust passive component values for SPICE simulation or not.

  • spice_current_sheet_as_root – Whether the current schematic sheet is considered the root for SPICE simulation or not.

  • spice_external_command – External command to run for SPICE simulation.

  • spice_model_current_sheet_as_root – Whether the current schematic sheet is considered the root for NGSPICE model loading or not.

  • spice_save_all_currents – Whether to save all currents during SPICE simulation or not.

  • spice_save_all_voltages – Whether to save all voltages during SPICE simulation or not.

  • subpart_first_id – The starting ID for subparts in the schematic.

  • subpart_id_separator – The character used as separator for subpart IDs.

annotate_start_num: int | None
drawing: Drawing | None
legacy_lib_dir: str
legacy_lib_list: list
meta: Meta | None
net_format_name: str | None
ngspice: Ngspice | None
page_layout_descr_file: str | None
plot_directory: str | None
spice_adjust_passive_values: bool | None
spice_current_sheet_as_root: bool | None
spice_external_command: str | None
spice_model_current_sheet_as_root: bool | None
spice_save_all_currents: bool | None
spice_save_all_voltages: bool | None
subpart_first_id: int | None
subpart_id_separator: int | None
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'annotate_start_num': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'drawing': FieldInfo(annotation=Union[Drawing, NoneType], required=False, default=None), 'legacy_lib_dir': FieldInfo(annotation=str, required=True), 'legacy_lib_list': FieldInfo(annotation=list, required=True), 'meta': FieldInfo(annotation=Union[Meta, NoneType], required=False, default=None), 'net_format_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'ngspice': FieldInfo(annotation=Union[Ngspice, NoneType], required=False, default=None), 'page_layout_descr_file': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'plot_directory': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'spice_adjust_passive_values': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'spice_current_sheet_as_root': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'spice_external_command': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'spice_model_current_sheet_as_root': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'spice_save_all_currents': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'spice_save_all_voltages': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'subpart_first_id': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'subpart_id_separator': FieldInfo(annotation=Union[int, NoneType], required=False, default=None)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class edea.kicad.project.ProjectSheet(uuid: UUID, name: str)

Bases: NamedTuple

A project sheet within a KiCad project.

Parameters:
  • uuid – The Universally Unique Identifier (UUID) of the project sheet.

  • name – The name of the project sheet.

uuid: UUID

Alias for field number 0

name: str

Alias for field number 1

class edea.kicad.project.KicadProject(*, board: Board, boards: list, cvpcb: Cvpcb | None = None, erc: Erc | None = None, libraries: Libraries, meta: Meta, net_settings: NetSettings, pcbnew: Pcbnew, schematic: ProjectSchematic | None = None, sheets: list[ProjectSheet], text_variables: dict[str, Any], **extra_data: Any)

Bases: BaseModel

The entire KiCad project structure as defined in a Cvpcb file.

Parameters:
  • board – An instance of Board.

  • boards – A list of board definitions.

  • cvpcb – An instance of Cvpcb.

  • erc – An instance of Erc.

  • libraries – An instance of Libraries.

  • meta – An instance of Meta.

  • net_settings – An instance of NetSettings.

  • pcbnew – An instance of Pcbnew.

  • schematic – An instance of ProjectSchematic.

  • sheets – A list of project sheets.

  • text_variables – A dictionary of text variables.

board: Board
boards: list
cvpcb: Cvpcb | None
erc: Erc | None
libraries: Libraries
meta: Meta
net_settings: NetSettings
pcbnew: Pcbnew
schematic: ProjectSchematic | None
sheets: list[ProjectSheet]
text_variables: dict[str, Any]
static find_pro_file_in_path(project_path: Path)
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'board': FieldInfo(annotation=Board, required=True), 'boards': FieldInfo(annotation=list, required=True), 'cvpcb': FieldInfo(annotation=Union[Cvpcb, NoneType], required=False, default=None), 'erc': FieldInfo(annotation=Union[Erc, NoneType], required=False, default=None), 'libraries': FieldInfo(annotation=Libraries, required=True), 'meta': FieldInfo(annotation=Meta, required=True), 'net_settings': FieldInfo(annotation=NetSettings, required=True), 'pcbnew': FieldInfo(annotation=Pcbnew, required=True), 'schematic': FieldInfo(annotation=Union[ProjectSchematic, NoneType], required=False, default=None), 'sheets': FieldInfo(annotation=list[ProjectSheet], required=True), 'text_variables': FieldInfo(annotation=dict[str, Any], required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.