kicad-python 0.1.0__py3-none-any.whl

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 (48) hide show
  1. kicad_python-0.1.0.dist-info/LICENSE +674 -0
  2. kicad_python-0.1.0.dist-info/METADATA +75 -0
  3. kicad_python-0.1.0.dist-info/RECORD +48 -0
  4. kicad_python-0.1.0.dist-info/WHEEL +5 -0
  5. kicad_python-0.1.0.dist-info/top_level.txt +1 -0
  6. kipy/__init__.py +20 -0
  7. kipy/board.py +467 -0
  8. kipy/board_types.py +1800 -0
  9. kipy/client.py +88 -0
  10. kipy/common_types.py +842 -0
  11. kipy/errors.py +37 -0
  12. kipy/geometry.py +604 -0
  13. kipy/kicad.py +176 -0
  14. kipy/project.py +71 -0
  15. kipy/project_types.py +28 -0
  16. kipy/proto/__init__.py +20 -0
  17. kipy/proto/board/__init__.py +20 -0
  18. kipy/proto/board/board_commands_pb2.py +56 -0
  19. kipy/proto/board/board_commands_pb2.pyi +487 -0
  20. kipy/proto/board/board_pb2.py +44 -0
  21. kipy/proto/board/board_pb2.pyi +294 -0
  22. kipy/proto/board/board_types_pb2.py +150 -0
  23. kipy/proto/board/board_types_pb2.pyi +2101 -0
  24. kipy/proto/common/__init__.py +23 -0
  25. kipy/proto/common/commands/__init__.py +21 -0
  26. kipy/proto/common/commands/base_commands_pb2.py +31 -0
  27. kipy/proto/common/commands/base_commands_pb2.pyi +172 -0
  28. kipy/proto/common/commands/editor_commands_pb2.py +91 -0
  29. kipy/proto/common/commands/editor_commands_pb2.pyi +814 -0
  30. kipy/proto/common/commands/project_commands_pb2.py +24 -0
  31. kipy/proto/common/commands/project_commands_pb2.pyi +93 -0
  32. kipy/proto/common/envelope_pb2.py +27 -0
  33. kipy/proto/common/envelope_pb2.pyi +188 -0
  34. kipy/proto/common/types/__init__.py +22 -0
  35. kipy/proto/common/types/base_types_pb2.py +100 -0
  36. kipy/proto/common/types/base_types_pb2.pyi +1058 -0
  37. kipy/proto/common/types/enums_pb2.py +22 -0
  38. kipy/proto/common/types/enums_pb2.pyi +189 -0
  39. kipy/proto/common/types/project_settings_pb2.py +16 -0
  40. kipy/proto/common/types/project_settings_pb2.pyi +26 -0
  41. kipy/proto/schematic/schematic_commands_pb2.py +14 -0
  42. kipy/proto/schematic/schematic_commands_pb2.pyi +23 -0
  43. kipy/proto/schematic/schematic_types_pb2.py +29 -0
  44. kipy/proto/schematic/schematic_types_pb2.pyi +214 -0
  45. kipy/util/__init__.py +21 -0
  46. kipy/util/proto.py +61 -0
  47. kipy/util/units.py +31 -0
  48. kipy/wrapper.py +35 -0
kipy/wrapper.py ADDED
@@ -0,0 +1,35 @@
1
+ # This program source code file is part of KiCad, a free EDA CAD application.
2
+ #
3
+ # Copyright (C) 2024 KiCad Developers
4
+ #
5
+ # This program is free software: you can redistribute it and/or modify it
6
+ # under the terms of the GNU General Public License as published by the
7
+ # Free Software Foundation, either version 3 of the License, or (at your
8
+ # option) any later version.
9
+ #
10
+ # This program is distributed in the hope that it will be useful, but
11
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU General Public License along
16
+ # with this program. If not, see <http://www.gnu.org/licenses/>.
17
+
18
+ from abc import ABC, abstractmethod
19
+
20
+ from google.protobuf.message import Message
21
+ from kipy.proto.common.types.base_types_pb2 import KIID
22
+
23
+ class Wrapper(ABC):
24
+ def __init__(self, proto: Message):
25
+ pass
26
+
27
+ @property
28
+ def proto(self):
29
+ return self.__dict__['_proto']
30
+
31
+ class Item(Wrapper):
32
+ @property
33
+ @abstractmethod
34
+ def id(self) -> KIID:
35
+ return KIID()