
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
kicad-python
Advanced tools
kicad-python is the official Python bindings for the KiCad IPC API. This
library makes it possible to develop scripts and tools that interact with a running KiCad session.
The KiCad IPC API can be considered in "public beta" state with the release of KiCad 9 (currently planned for on or around February 1, 2025). The existing SWIG-based Python bindings for KiCad's PCB editor still exist in KiCad 9, but are in maintenance mode and will not be expanded.
For more information about the IPC API, please see the KiCad developer documentation. Specific documentation for developing add-ons is also available.
Note: Version 0.0.2 and prior of this package are an obsolete earlier effort and are unrelated to this codebase.
Using the IPC API requires a suitable version of KiCad (9.0 or higher) and requires that KiCad be
running with the API server enabled in Preferences > Plugins. This package also depends on the
protobuf and pynng packages for communication with KiCad.
Note: Unlike the SWIG-based Python bindings, the IPC API requires communication with a running instance of KiCad. It is not possible to use
kicad-pythonto manipulate KiCad design files without KiCad running.
Please file bug reports and feature requests in this Gitlab project. The team may move them to the main KiCad repository depending on the nature of the request.
Merge requests are welcome for minor fixes and improvements. More significant changes should be discussed with the development team (via email, or in an issue) first.
Most users should use kicad-python by installing the latest version from PyPI. You can also
build and install the library from this repository, to test unreleased changes or contribute to
the development. For instructions on how to do so, please see COMPILING.md.
Note that this library builds against the API definitions (.proto files) in the kicad submodule.
Official releases of the library to PyPI should use a tagged release of KiCad, but the development
branch of kicad-python may sometimes move the submodule pointer to non-tagged commits during the
course of development. If you are using this library from source rather than from PyPI, remember
to keep the submodule updated and to test against a suitable build of KiCad, which may need to be
a nightly or testing build in some situations. You can use the method KiCad.check_version to
make sure you are using a compatible version of kicad-python for your installed version of KiCad.
To check that everything is working, install kicad-python (either follow the directions in
COMPILING.md or else install the latest version from PyPI using pip install kicad-python).
Launch KiCad, make sure the API server is enabled in Preferences > Plugins, and then you should be
able to run:
$ python3 ./examples/hello.py
This should print out the version of KiCad you have connected to.
The documentation created from this repository (via the docs directory and the docstrings in the
source code) is hosted at https://docs.kicad.org/kicad-python-main
Many things are still not documented or underdocumented -- contributions that expand the documentation or add docstrings are welcomed.
Check out the repository for some example scripts that may serve as a starting point. Some of the examples are snippets that can be run directly from a terminal or your Python development environment, and some are KiCad action plugins that can be loaded into the PCB editor. For the plugins, copy or symlink them into the appropriate plugins path in order for KiCad to find them.
pynng 0.9.0 (John Hagen, !37)locked properties to Track and ArcTrack (Anton Lazarev, !34)Board.get_layer_name (KiCad 9.0.8) (#94)PolygonWithHoles outline and holes are closed shapes (#73)Project taking over the document passed into it (#78)Field.name (#87)Pad.pad_to_die_length (KiCad 9.0.4)Board.get_enabled_layers, Board.set_enabled_layers, and Board.get_copper_layer_count (KiCad 9.0.5)BoardCircle.rotate (@modbw, !33)BoardPolygons in a more ergonomic wayFootprintInstance.sheet_path property (#37)board.check_padstack_presence_on_layers, replacing FlashLayer in SWIGNet.name so that new nets can be createdNet.code (net codes are an internal KiCad detail and API clients should ignore them)py.typed type hinting indicator file (John Hagen, !16)Vector2.from_xy_mm type annotations (John Hagen, !17)Arc.angle and ArcTrack.angle; some arc angle utilities (Quentin Freimanis, !14)remove_items_by_id (Anthonypark, !20)Zone (#62)Pad.pad_type (#63)Field.layer (#64)visible property to Field and deprecate it from TextAttributes to match KiCad changesboard.get_origin and board.set_origin (#20)ArcTrack.length (Thanh Duong, !12)Footprint.models (#31)Board.update_items and document it (#35)util.board_layer.canonical_name names for technical layersrequirements.txt files in sample pluginsBoardCircle.__repr__ (#13)Corresponding KiCad version: 9.0.0-rc1
First formal release of the new IPC-API version of this package. Contains support for most of the KiCad API functionality that is currently exposed, which is focused around the PCB editor to enable a transition path from existing SWIG-based plugins.
FAQs
KiCad API Python Bindings
We found that kicad-python demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.