Module metadata

EDeA module metadata.

class edea.metadata.EdeaModuleMetadata(*, area_mm: float | None = None, width_mm: float | None = None, height_mm: float | None = None, count_copper_layer: int | None = None, sheets: int | None = None, count_part: int | None = None, count_unique_part: int | None = None, parts: dict[str, dict[str, str]] = {})

Bases: BaseModel

Metadata for the EDeA module.

Parameters:
  • area_mm – The area of the module in millimeters.

  • width_mm – The width of the module in millimeters.

  • height_mm – The height of the module in millimeters.

  • count_copper_layer – The number of copper layers in the module schematic.

  • sheets – The number of sheets in the module schematic.

  • count_part – The total number of parts in the module.

  • count_unique_part – The number of unique parts in the module.

  • parts – Detailed information about the parts in the module.

area_mm: float | None
width_mm: float | None
height_mm: float | None
count_copper_layer: int | None
sheets: int | None
count_part: int | None
count_unique_part: int | None
parts: dict[str, dict[str, str]]
model_config: ClassVar[ConfigDict] = {}

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

class edea.metadata.Project(path: str)

Bases: object

A convenience wrapper for loading kicad project files. Provides metadata about the project.

Parameters:

path – The path of the kicad_pro.

Raises:

ValueError – If the provided path doesn’t end with the ‘.kicad_pro’ extension.

property metadata

Project metadata.

Returns:

Moduel’s area, width, height, number of copper layers, number of sheets, number of parts, number of unique parts, and detailed information about the parts.

Raises:

Warning – If it couldn’t calculate the board size.