Allow Kicad to talk to an external library server or database using a REST API
Description
[JE 20230506] See comments below; refocusing this issue on a REST API rather than binary plugins
Currently Kicad is not capable of talking to a simple database such as an Excel spreadsheet, a MYSQL database, Mouser or Digikey API or an inventory management system.
Expected behavior:
When I have selected a schematic symbol from the standard library, I'd like to be able to open the 'Symbol Properties' or 'Symbol Fields Table' to fetch part information from an external source.
Idea: Eeschema would simply provide a framework which connects to one or more plugins and the plugins themselves would be provided by the community as .dll or .so which then are saved somewhere on the computer and simply loaded when needed. The plugin can be programmed in any language such as python, java, c# etc. and would only need to honour the defined C wrapper interface. Plugin which don't adhere to that are simply ignored.
I have created a first draft of that framework to solve an laborious task I face once in a while and am wondering if this is something that is generally useful for the broader public. I also programmed a plugin for Inventree which is used here as part database.
In general: the framework is intended to use multiple plugins at the same time so that a user could potentially query for example Mouser, Digikey, Navision and Inventree at the same time.
The workflow
A brand new project would be to:
- select a symbol from the standard kicad library
- open plugin search and search for the specific part
- transfer all metadata automatically into your schematic
Existing project:
- Open fields editor and bulk apply metadata using the above mentioned approach.
Screen Shots
KiCad Version
Application: KiCad Schematic Editor (64-bit)
Version: (6.99.0-2217-gc029ec6692-dirty), debug build
Libraries:
wxWidgets 3.1.7
FreeType 2.11.1
HarfBuzz 4.2.0
FontConfig 2.14.0
libcurl/7.83.1-DEV Schannel zlib/1.2.12
Platform: Windows 11 (build 22000), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Date: Jul 15 2022 09:00:35
wxWidgets: 3.1.7 (wchar_t,wx containers)
Boost: 1.79.0
OCC: 7.6.0
Curl: 7.83.1-DEV
ngspice: 37
Compiler: Visual C++ 1932 without C++ ABI
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON
KICAD_STDLIB_DEBUG=OFF
KICAD_STDLIB_LIGHT_DEBUG=OFF
KICAD_SANITIZE_ADDRESS=OFF
KICAD_SANITIZE_THREADS=OFF