kicad-python 0.1.1__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. kicad_python-0.2.0/LICENSE +19 -0
  2. kicad_python-0.2.0/PKG-INFO +125 -0
  3. kicad_python-0.2.0/README.md +102 -0
  4. kicad_python-0.2.0/build/lib/kipy/__init__.py +23 -0
  5. kicad_python-0.2.0/build/lib/kipy/board.py +801 -0
  6. {kicad_python-0.1.1 → kicad_python-0.2.0}/build/lib/kipy/board_types.py +324 -21
  7. {kicad_python-0.1.1 → kicad_python-0.2.0}/build/lib/kipy/client.py +16 -13
  8. {kicad_python-0.1.1 → kicad_python-0.2.0/build/lib}/kipy/common_types.py +16 -13
  9. kicad_python-0.2.0/build/lib/kipy/errors.py +47 -0
  10. {kicad_python-0.1.1 → kicad_python-0.2.0/build/lib}/kipy/geometry.py +46 -23
  11. {kicad_python-0.1.1 → kicad_python-0.2.0/build/lib}/kipy/kicad.py +89 -20
  12. kicad_python-0.2.0/build/lib/kipy/kicad_api_version.py +2 -0
  13. kicad_python-0.2.0/build/lib/kipy/project.py +95 -0
  14. kicad_python-0.2.0/build/lib/kipy/project_types.py +285 -0
  15. kicad_python-0.2.0/build/lib/kipy/proto/__init__.py +21 -0
  16. kicad_python-0.2.0/build/lib/kipy/proto/board/__init__.py +23 -0
  17. kicad_python-0.2.0/build/lib/kipy/proto/board/board_commands_pb2.py +79 -0
  18. {kicad_python-0.1.1 → kicad_python-0.2.0}/build/lib/kipy/proto/board/board_commands_pb2.pyi +200 -1
  19. kicad_python-0.2.0/build/lib/kipy/proto/board/board_pb2.py +50 -0
  20. {kicad_python-0.1.1 → kicad_python-0.2.0}/build/lib/kipy/proto/board/board_pb2.pyi +81 -6
  21. kicad_python-0.2.0/build/lib/kipy/proto/board/board_types_pb2.py +150 -0
  22. {kicad_python-0.1.1 → kicad_python-0.2.0}/build/lib/kipy/proto/board/board_types_pb2.pyi +10 -4
  23. kicad_python-0.2.0/build/lib/kipy/proto/common/__init__.py +26 -0
  24. kicad_python-0.2.0/build/lib/kipy/proto/common/commands/__init__.py +24 -0
  25. kicad_python-0.2.0/build/lib/kipy/proto/common/commands/base_commands_pb2.py +39 -0
  26. {kicad_python-0.1.1 → kicad_python-0.2.0/build/lib}/kipy/proto/common/commands/base_commands_pb2.pyi +63 -1
  27. kicad_python-0.2.0/build/lib/kipy/proto/common/commands/editor_commands_pb2.py +109 -0
  28. {kicad_python-0.1.1 → kicad_python-0.2.0}/build/lib/kipy/proto/common/commands/editor_commands_pb2.pyi +206 -0
  29. {kicad_python-0.1.1 → kicad_python-0.2.0/build/lib}/kipy/proto/common/commands/project_commands_pb2.py +11 -5
  30. kicad_python-0.2.0/build/lib/kipy/proto/common/commands/project_commands_pb2.pyi +163 -0
  31. {kicad_python-0.1.1 → kicad_python-0.2.0}/build/lib/kipy/proto/common/types/base_types_pb2.py +3 -1
  32. {kicad_python-0.1.1 → kicad_python-0.2.0}/build/lib/kipy/proto/common/types/base_types_pb2.pyi +21 -0
  33. kicad_python-0.2.0/build/lib/kipy/proto/common/types/project_settings_pb2.py +31 -0
  34. kicad_python-0.2.0/build/lib/kipy/proto/common/types/project_settings_pb2.pyi +260 -0
  35. kicad_python-0.2.0/build/lib/kipy/util/__init__.py +24 -0
  36. kicad_python-0.2.0/build/lib/kipy/util/board_layer.py +135 -0
  37. {kicad_python-0.1.1 → kicad_python-0.2.0/build/lib}/kipy/util/proto.py +16 -13
  38. kicad_python-0.2.0/build/lib/kipy/util/units.py +34 -0
  39. kicad_python-0.2.0/build/lib/kipy/wrapper.py +38 -0
  40. kicad_python-0.2.0/build.py +64 -0
  41. kicad_python-0.2.0/kipy/__init__.py +23 -0
  42. kicad_python-0.2.0/kipy/board.py +801 -0
  43. {kicad_python-0.1.1 → kicad_python-0.2.0}/kipy/board_types.py +324 -21
  44. {kicad_python-0.1.1 → kicad_python-0.2.0}/kipy/client.py +16 -13
  45. {kicad_python-0.1.1/build/lib → kicad_python-0.2.0}/kipy/common_types.py +16 -13
  46. kicad_python-0.2.0/kipy/errors.py +47 -0
  47. {kicad_python-0.1.1/build/lib → kicad_python-0.2.0}/kipy/geometry.py +46 -23
  48. {kicad_python-0.1.1/build/lib → kicad_python-0.2.0}/kipy/kicad.py +89 -20
  49. kicad_python-0.2.0/kipy/kicad_api_version.py +2 -0
  50. kicad_python-0.2.0/kipy/project.py +95 -0
  51. kicad_python-0.2.0/kipy/project_types.py +285 -0
  52. kicad_python-0.2.0/kipy/proto/__init__.py +21 -0
  53. kicad_python-0.2.0/kipy/proto/board/__init__.py +23 -0
  54. kicad_python-0.2.0/kipy/proto/board/board_commands_pb2.py +79 -0
  55. {kicad_python-0.1.1 → kicad_python-0.2.0}/kipy/proto/board/board_commands_pb2.pyi +200 -1
  56. kicad_python-0.2.0/kipy/proto/board/board_pb2.py +50 -0
  57. {kicad_python-0.1.1 → kicad_python-0.2.0}/kipy/proto/board/board_pb2.pyi +81 -6
  58. kicad_python-0.2.0/kipy/proto/board/board_types_pb2.py +150 -0
  59. {kicad_python-0.1.1 → kicad_python-0.2.0}/kipy/proto/board/board_types_pb2.pyi +10 -4
  60. kicad_python-0.2.0/kipy/proto/common/__init__.py +26 -0
  61. kicad_python-0.2.0/kipy/proto/common/commands/__init__.py +24 -0
  62. kicad_python-0.2.0/kipy/proto/common/commands/base_commands_pb2.py +39 -0
  63. {kicad_python-0.1.1/build/lib → kicad_python-0.2.0}/kipy/proto/common/commands/base_commands_pb2.pyi +63 -1
  64. kicad_python-0.2.0/kipy/proto/common/commands/editor_commands_pb2.py +109 -0
  65. {kicad_python-0.1.1 → kicad_python-0.2.0}/kipy/proto/common/commands/editor_commands_pb2.pyi +206 -0
  66. {kicad_python-0.1.1/build/lib → kicad_python-0.2.0}/kipy/proto/common/commands/project_commands_pb2.py +11 -5
  67. kicad_python-0.2.0/kipy/proto/common/commands/project_commands_pb2.pyi +163 -0
  68. {kicad_python-0.1.1 → kicad_python-0.2.0}/kipy/proto/common/types/base_types_pb2.py +3 -1
  69. {kicad_python-0.1.1 → kicad_python-0.2.0}/kipy/proto/common/types/base_types_pb2.pyi +21 -0
  70. kicad_python-0.2.0/kipy/proto/common/types/project_settings_pb2.py +31 -0
  71. kicad_python-0.2.0/kipy/proto/common/types/project_settings_pb2.pyi +260 -0
  72. kicad_python-0.2.0/kipy/util/__init__.py +24 -0
  73. kicad_python-0.2.0/kipy/util/board_layer.py +135 -0
  74. {kicad_python-0.1.1/build/lib → kicad_python-0.2.0}/kipy/util/proto.py +16 -13
  75. kicad_python-0.2.0/kipy/util/units.py +34 -0
  76. kicad_python-0.2.0/kipy/wrapper.py +38 -0
  77. {kicad_python-0.1.1 → kicad_python-0.2.0}/pyproject.toml +12 -10
  78. kicad_python-0.2.0/setup.py +38 -0
  79. kicad_python-0.1.1/LICENSE +0 -674
  80. kicad_python-0.1.1/PKG-INFO +0 -91
  81. kicad_python-0.1.1/README.md +0 -65
  82. kicad_python-0.1.1/build/lib/kipy/__init__.py +0 -20
  83. kicad_python-0.1.1/build/lib/kipy/board.py +0 -467
  84. kicad_python-0.1.1/build/lib/kipy/errors.py +0 -37
  85. kicad_python-0.1.1/build/lib/kipy/project.py +0 -71
  86. kicad_python-0.1.1/build/lib/kipy/project_types.py +0 -28
  87. kicad_python-0.1.1/build/lib/kipy/proto/__init__.py +0 -20
  88. kicad_python-0.1.1/build/lib/kipy/proto/board/__init__.py +0 -20
  89. kicad_python-0.1.1/build/lib/kipy/proto/board/board_commands_pb2.py +0 -56
  90. kicad_python-0.1.1/build/lib/kipy/proto/board/board_pb2.py +0 -44
  91. kicad_python-0.1.1/build/lib/kipy/proto/board/board_types_pb2.py +0 -150
  92. kicad_python-0.1.1/build/lib/kipy/proto/common/__init__.py +0 -23
  93. kicad_python-0.1.1/build/lib/kipy/proto/common/commands/__init__.py +0 -21
  94. kicad_python-0.1.1/build/lib/kipy/proto/common/commands/base_commands_pb2.py +0 -31
  95. kicad_python-0.1.1/build/lib/kipy/proto/common/commands/editor_commands_pb2.py +0 -91
  96. kicad_python-0.1.1/build/lib/kipy/proto/common/commands/project_commands_pb2.pyi +0 -97
  97. kicad_python-0.1.1/build/lib/kipy/proto/common/types/project_settings_pb2.py +0 -16
  98. kicad_python-0.1.1/build/lib/kipy/proto/common/types/project_settings_pb2.pyi +0 -30
  99. kicad_python-0.1.1/build/lib/kipy/util/__init__.py +0 -21
  100. kicad_python-0.1.1/build/lib/kipy/util/units.py +0 -31
  101. kicad_python-0.1.1/build/lib/kipy/wrapper.py +0 -35
  102. kicad_python-0.1.1/build.py +0 -50
  103. kicad_python-0.1.1/kipy/__init__.py +0 -20
  104. kicad_python-0.1.1/kipy/board.py +0 -467
  105. kicad_python-0.1.1/kipy/errors.py +0 -37
  106. kicad_python-0.1.1/kipy/project.py +0 -71
  107. kicad_python-0.1.1/kipy/project_types.py +0 -28
  108. kicad_python-0.1.1/kipy/proto/__init__.py +0 -20
  109. kicad_python-0.1.1/kipy/proto/board/__init__.py +0 -20
  110. kicad_python-0.1.1/kipy/proto/board/board_commands_pb2.py +0 -56
  111. kicad_python-0.1.1/kipy/proto/board/board_pb2.py +0 -44
  112. kicad_python-0.1.1/kipy/proto/board/board_types_pb2.py +0 -150
  113. kicad_python-0.1.1/kipy/proto/common/__init__.py +0 -23
  114. kicad_python-0.1.1/kipy/proto/common/commands/__init__.py +0 -21
  115. kicad_python-0.1.1/kipy/proto/common/commands/base_commands_pb2.py +0 -31
  116. kicad_python-0.1.1/kipy/proto/common/commands/editor_commands_pb2.py +0 -91
  117. kicad_python-0.1.1/kipy/proto/common/commands/project_commands_pb2.pyi +0 -97
  118. kicad_python-0.1.1/kipy/proto/common/types/project_settings_pb2.py +0 -16
  119. kicad_python-0.1.1/kipy/proto/common/types/project_settings_pb2.pyi +0 -30
  120. kicad_python-0.1.1/kipy/util/__init__.py +0 -21
  121. kicad_python-0.1.1/kipy/util/units.py +0 -31
  122. kicad_python-0.1.1/kipy/wrapper.py +0 -35
  123. kicad_python-0.1.1/setup.py +0 -41
  124. {kicad_python-0.1.1 → kicad_python-0.2.0}/build/lib/kipy/proto/common/envelope_pb2.py +0 -0
  125. {kicad_python-0.1.1 → kicad_python-0.2.0}/build/lib/kipy/proto/common/envelope_pb2.pyi +0 -0
  126. {kicad_python-0.1.1 → kicad_python-0.2.0}/build/lib/kipy/proto/common/types/__init__.py +0 -0
  127. {kicad_python-0.1.1 → kicad_python-0.2.0}/build/lib/kipy/proto/common/types/enums_pb2.py +0 -0
  128. {kicad_python-0.1.1 → kicad_python-0.2.0}/build/lib/kipy/proto/common/types/enums_pb2.pyi +0 -0
  129. {kicad_python-0.1.1 → kicad_python-0.2.0}/build/lib/kipy/proto/schematic/schematic_commands_pb2.py +0 -0
  130. {kicad_python-0.1.1 → kicad_python-0.2.0}/build/lib/kipy/proto/schematic/schematic_commands_pb2.pyi +0 -0
  131. {kicad_python-0.1.1 → kicad_python-0.2.0}/build/lib/kipy/proto/schematic/schematic_types_pb2.py +0 -0
  132. {kicad_python-0.1.1 → kicad_python-0.2.0}/build/lib/kipy/proto/schematic/schematic_types_pb2.pyi +0 -0
  133. {kicad_python-0.1.1 → kicad_python-0.2.0}/kipy/proto/common/envelope_pb2.py +0 -0
  134. {kicad_python-0.1.1 → kicad_python-0.2.0}/kipy/proto/common/envelope_pb2.pyi +0 -0
  135. {kicad_python-0.1.1 → kicad_python-0.2.0}/kipy/proto/common/types/__init__.py +0 -0
  136. {kicad_python-0.1.1 → kicad_python-0.2.0}/kipy/proto/common/types/enums_pb2.py +0 -0
  137. {kicad_python-0.1.1 → kicad_python-0.2.0}/kipy/proto/common/types/enums_pb2.pyi +0 -0
  138. {kicad_python-0.1.1 → kicad_python-0.2.0}/kipy/proto/schematic/schematic_commands_pb2.py +0 -0
  139. {kicad_python-0.1.1 → kicad_python-0.2.0}/kipy/proto/schematic/schematic_commands_pb2.pyi +0 -0
  140. {kicad_python-0.1.1 → kicad_python-0.2.0}/kipy/proto/schematic/schematic_types_pb2.py +0 -0
  141. {kicad_python-0.1.1 → kicad_python-0.2.0}/kipy/proto/schematic/schematic_types_pb2.pyi +0 -0
@@ -0,0 +1,19 @@
1
+ Copyright The KiCad Developers
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the “Software”), to deal in
5
+ the Software without restriction, including without limitation the rights to
6
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
+ of the Software, and to permit persons to whom the Software is furnished to do
8
+ so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
@@ -0,0 +1,125 @@
1
+ Metadata-Version: 2.1
2
+ Name: kicad-python
3
+ Version: 0.2.0
4
+ Summary: KiCad API Python Bindings
5
+ Home-page: https://kicad.org/
6
+ License: MIT
7
+ Author: The KiCad Development Team
8
+ Requires-Python: >=3.9,<4.0
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
18
+ Requires-Dist: protobuf (>=5.29,<6.0)
19
+ Requires-Dist: pynng (>=0.8.0,<0.9.0)
20
+ Project-URL: Repository, https://gitlab.com/kicad/code/kicad-python
21
+ Description-Content-Type: text/markdown
22
+
23
+ # KiCad API Python Bindings
24
+
25
+ `kicad-python` is the official Python bindings for the [KiCad](https://kicad.org) IPC API. This
26
+ library makes it possible to develop scripts and tools that interact with a running KiCad session.
27
+
28
+ The KiCad IPC API can be considered in "public beta" state with the release of KiCad 9 (currently
29
+ planned for on or around February 1, 2025). The existing SWIG-based Python bindings for KiCad's
30
+ PCB editor still exist in KiCad 9, but are in maintenance mode and will not be expanded.
31
+
32
+ For more information about the IPC API, please see the [KiCad developer documentation](https://dev-docs.kicad.org/en/apis-and-binding/ipc-api/index.html). Specific documentation for developing add-ons is [also available](https://dev-docs.kicad.org/en/apis-and-binding/ipc-api/for-addon-developers/index.html).
33
+
34
+ > Note: Version 0.0.2 and prior of this package are an obsolete earlier effort and are unrelated to
35
+ > this codebase.
36
+
37
+ ## Requirements
38
+
39
+ Using the IPC API requires a suitable version of KiCad (9.0 or higher) and requires that KiCad be
40
+ running with the API server enabled in Preferences > Plugins. This package also depends on the
41
+ `protobuf` and `pynng` packages for communication with KiCad.
42
+
43
+ > Note: Unlike the SWIG-based Python bindings, the IPC API requires communication with a running
44
+ > instance of KiCad. It is not possible to use `kicad-python` to manipulate KiCad design files
45
+ > without KiCad running.
46
+
47
+ ## Contributing
48
+
49
+ Please file bug reports and feature requests in this Gitlab project. The team may move them to the
50
+ main KiCad repository depending on the nature of the request.
51
+
52
+ Merge requests are welcome for minor fixes and improvements. More significant changes should be
53
+ discussed with the development team (via email, or in an issue) first.
54
+
55
+ ## Building from Source
56
+
57
+ Most users should use `kicad-python` by installing the latest version from PyPI. You can also
58
+ build and install the library from this repository, to test unreleased changes or contribute to
59
+ the development. For instructions on how to do so, please see `COMPILING.md`.
60
+
61
+ Note that this library builds against the API definitions (`.proto` files) in the `kicad` submodule.
62
+ Official releases of the library to PyPI should use a tagged release of KiCad, but the development
63
+ branch of `kicad-python` may sometimes move the submodule pointer to non-tagged commits during the
64
+ course of development. If you are using this library from source rather than from PyPI, remember
65
+ to keep the submodule updated and to test against a suitable build of KiCad, which may need to be
66
+ a nightly or testing build in some situations. You can use the method `KiCad.check_version` to
67
+ make sure you are using a compatible version of `kicad-python` for your installed version of KiCad.
68
+
69
+ ## Getting Started
70
+
71
+ To check that everything is working, install `kicad-python` (either follow the directions in
72
+ COMPILING.md or else install the latest version from PyPI using `pip install kicad-python`).
73
+ Launch KiCad, make sure the API server is enabled in Preferences > Plugins, and then you should be
74
+ able to run:
75
+
76
+ ```sh
77
+ $ python3 ./examples/hello.py
78
+ ```
79
+
80
+ This should print out the version of KiCad you have connected to.
81
+
82
+ ## Documentation
83
+
84
+ There is no documentation separate from the code comments and examples yet, sorry! This will be
85
+ more of a priority once the KiCad 9 release is stable.
86
+
87
+ ## Examples
88
+
89
+ Check out the repository for some example scripts that may serve as a starting point. Some of the
90
+ examples are snippets that can be run directly from a terminal or your Python development
91
+ environment, and some are KiCad action plugins that can be loaded into the PCB editor. For the
92
+ plugins, copy or symlink them into the appropriate plugins path in order for KiCad to find them.
93
+
94
+ ## Release History
95
+
96
+ ### 0.2.0 (February 19, 2025)
97
+
98
+ - Updates for KiCad 9.0.0 release
99
+ - Fix `util.board_layer.canonical_name` names for technical layers
100
+ - Add board item selection management APIs
101
+ - Fix `requirements.txt` files in sample plugins
102
+ - Fix RecursionError when calling `BoardCircle.__repr__` (#13)
103
+ - Relicense as MIT
104
+
105
+ ### 0.1.2 (January 17, 2025)
106
+
107
+ - Updates for KiCad 9.0.0-rc2 release
108
+ - Fixes to plugin examples
109
+ - Add support for various project settings, board stackup, board file management
110
+ - Add helpers for board layer name conversions
111
+ - Change thermal spoke settings to match updated KiCad API
112
+ - Documentation improvements
113
+
114
+ ### 0.1.1 (December 24, 2024)
115
+
116
+ - Bump dependency versions to fix compilation with newer protoc
117
+
118
+ ### 0.1.0 (December 21, 2024)
119
+
120
+ *Corresponding KiCad version: 9.0.0-rc1*
121
+
122
+ First formal release of the new IPC-API version of this package. Contains support for most of the
123
+ KiCad API functionality that is currently exposed, which is focused around the PCB editor to enable
124
+ a transition path from existing SWIG-based plugins.
125
+
@@ -0,0 +1,102 @@
1
+ # KiCad API Python Bindings
2
+
3
+ `kicad-python` is the official Python bindings for the [KiCad](https://kicad.org) IPC API. This
4
+ library makes it possible to develop scripts and tools that interact with a running KiCad session.
5
+
6
+ The KiCad IPC API can be considered in "public beta" state with the release of KiCad 9 (currently
7
+ planned for on or around February 1, 2025). The existing SWIG-based Python bindings for KiCad's
8
+ PCB editor still exist in KiCad 9, but are in maintenance mode and will not be expanded.
9
+
10
+ For more information about the IPC API, please see the [KiCad developer documentation](https://dev-docs.kicad.org/en/apis-and-binding/ipc-api/index.html). Specific documentation for developing add-ons is [also available](https://dev-docs.kicad.org/en/apis-and-binding/ipc-api/for-addon-developers/index.html).
11
+
12
+ > Note: Version 0.0.2 and prior of this package are an obsolete earlier effort and are unrelated to
13
+ > this codebase.
14
+
15
+ ## Requirements
16
+
17
+ Using the IPC API requires a suitable version of KiCad (9.0 or higher) and requires that KiCad be
18
+ running with the API server enabled in Preferences > Plugins. This package also depends on the
19
+ `protobuf` and `pynng` packages for communication with KiCad.
20
+
21
+ > Note: Unlike the SWIG-based Python bindings, the IPC API requires communication with a running
22
+ > instance of KiCad. It is not possible to use `kicad-python` to manipulate KiCad design files
23
+ > without KiCad running.
24
+
25
+ ## Contributing
26
+
27
+ Please file bug reports and feature requests in this Gitlab project. The team may move them to the
28
+ main KiCad repository depending on the nature of the request.
29
+
30
+ Merge requests are welcome for minor fixes and improvements. More significant changes should be
31
+ discussed with the development team (via email, or in an issue) first.
32
+
33
+ ## Building from Source
34
+
35
+ Most users should use `kicad-python` by installing the latest version from PyPI. You can also
36
+ build and install the library from this repository, to test unreleased changes or contribute to
37
+ the development. For instructions on how to do so, please see `COMPILING.md`.
38
+
39
+ Note that this library builds against the API definitions (`.proto` files) in the `kicad` submodule.
40
+ Official releases of the library to PyPI should use a tagged release of KiCad, but the development
41
+ branch of `kicad-python` may sometimes move the submodule pointer to non-tagged commits during the
42
+ course of development. If you are using this library from source rather than from PyPI, remember
43
+ to keep the submodule updated and to test against a suitable build of KiCad, which may need to be
44
+ a nightly or testing build in some situations. You can use the method `KiCad.check_version` to
45
+ make sure you are using a compatible version of `kicad-python` for your installed version of KiCad.
46
+
47
+ ## Getting Started
48
+
49
+ To check that everything is working, install `kicad-python` (either follow the directions in
50
+ COMPILING.md or else install the latest version from PyPI using `pip install kicad-python`).
51
+ Launch KiCad, make sure the API server is enabled in Preferences > Plugins, and then you should be
52
+ able to run:
53
+
54
+ ```sh
55
+ $ python3 ./examples/hello.py
56
+ ```
57
+
58
+ This should print out the version of KiCad you have connected to.
59
+
60
+ ## Documentation
61
+
62
+ There is no documentation separate from the code comments and examples yet, sorry! This will be
63
+ more of a priority once the KiCad 9 release is stable.
64
+
65
+ ## Examples
66
+
67
+ Check out the repository for some example scripts that may serve as a starting point. Some of the
68
+ examples are snippets that can be run directly from a terminal or your Python development
69
+ environment, and some are KiCad action plugins that can be loaded into the PCB editor. For the
70
+ plugins, copy or symlink them into the appropriate plugins path in order for KiCad to find them.
71
+
72
+ ## Release History
73
+
74
+ ### 0.2.0 (February 19, 2025)
75
+
76
+ - Updates for KiCad 9.0.0 release
77
+ - Fix `util.board_layer.canonical_name` names for technical layers
78
+ - Add board item selection management APIs
79
+ - Fix `requirements.txt` files in sample plugins
80
+ - Fix RecursionError when calling `BoardCircle.__repr__` (#13)
81
+ - Relicense as MIT
82
+
83
+ ### 0.1.2 (January 17, 2025)
84
+
85
+ - Updates for KiCad 9.0.0-rc2 release
86
+ - Fixes to plugin examples
87
+ - Add support for various project settings, board stackup, board file management
88
+ - Add helpers for board layer name conversions
89
+ - Change thermal spoke settings to match updated KiCad API
90
+ - Documentation improvements
91
+
92
+ ### 0.1.1 (December 24, 2024)
93
+
94
+ - Bump dependency versions to fix compilation with newer protoc
95
+
96
+ ### 0.1.0 (December 21, 2024)
97
+
98
+ *Corresponding KiCad version: 9.0.0-rc1*
99
+
100
+ First formal release of the new IPC-API version of this package. Contains support for most of the
101
+ KiCad API functionality that is currently exposed, which is focused around the PCB editor to enable
102
+ a transition path from existing SWIG-based plugins.
@@ -0,0 +1,23 @@
1
+ # Copyright The KiCad Developers
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the “Software”), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ # SOFTWARE.
20
+
21
+ from kipy.kicad import KiCad
22
+
23
+ __all__ = ("KiCad",)