KiCad HTTP library plugin for InvenTree
Project description
InvenTree KiCad - HTTP Library Plugin
A KiCad Conform API endpoint plugin, designed for seamless integration with InvenTree, empowers users to seamlessly incorporate InvenTree parts into KiCad's parts library tool. Please note that this plugin exclusively offers metadata and necessitates the presence of corresponding symbol and footprint libraries within the KiCad EDA environment.
As of the current stage of development, KiCad exclusively offers read-only access to parts. However, it's worth noting that there are active plans and ongoing efforts to expand KiCad's functionality to include the ability to not only retrieve but also update parts stored on the server. This enhancement will further empower users to interact with and contribute to the parts database within the KiCad environment.
Installing the Plugin
There are several methods available for installing this plugin. To gain a comprehensive understanding of the installation process, please refer to the InvenTree - Installing a Plugin Guide. Depending on your preferred approach, the following instructions will provide you with the necessary information.
Prior to plugin installation, ensure that you've activated both URL Integration and App Integration. You can accomplish this by going to Settings → Plugin Settings → Plugins. Additionally, if you're operating within a Docker environment, be sure to enable Check plugins on startup as well.
Through GitHub
Navigate to the Plugin Settings and click on the Install Plugin button. This will trigger a new window to appear, prompting you to enter the following information:
- Package Name: inventree-kicad-plugin
- Source URL: git+https://github.com/afkiwers/inventree-kicad-plugin
Through PiP
The plugin can be found here: inventree-kicad-plugin.
IMPORTANT: Remember to restart your server and run the migrate command to implement the model changes required for this plugin. Failure to do so may result in the plugin encountering issues and not functioning correctly.
Configure Plugin Settings
After installing the plugin, head over to the Plugin Settings and activate it. Look for KiCadLibraryPlugin in the list of available plugins. Once activated, you'll be able to open the plugin and proceed with the setup process.
Adding Categories to KiCad
Navigate to the admin backend, and scroll down until you find the INVENTREE_KICAD section. Within this section, click on KiCad Categories. If the section is not visible, ensure you've enabled the "Enable URL integration" and "Enable app integration" options in the Plugin Settings and run a database migration.
Once opened the "KiCad Categories" model, you'll have the option to add new categories which, once added, will be visible in KiCad's Symbol Chooser dialog.
Default Settings for Categories
The plugin allows you to set default values when the child part lacks specific details regarding the KiCad symbol, footprint, or reference. This feature is particularly useful when dealing with components such as resistors or capacitors, as they often share the same symbols, reducing the need for repetitive data entry.
Creating User Access Tokens
Head back to the admin backend and click on Tokens. Click on "ADD Token" to generate a token dedicated to a particular user. It is important to emphasize that it is highly advisable to create individual tokens for each user, rather than employing a single token for everyone.
KiCad Configuration files
Below is an example config which should help you get started reasonably quickly. The only thing needed here is to replace http://127.0.0.1:8000 with your server's InvenTree URL, and replace usertokendatastring with a valid token.
Save it as a file with .kicad_httplib
extension, as specified in the preliminary KiCad docs. To use it, add it as a symbol library inside KiCad.
{
"meta": {
"version": 1.0
},
"name": "KiCad HTTP Library",
"description": "A KiCad library sourced from a REST API",
"source": {
"type": "REST_API",
"api_version": "v1",
"root_url": "http://127.0.0.1:8000/plugin/kicad-library-plugin",
"token": "usertokendatastring"
}
}
FAQ
Why does this plugin need the App Mixin?
This plugin uses the App Mixin to add a custom model to the database to manage the selected categories. Otherwise, KiCad symbol chooser would be cluttered with every single category (See Categories)
Why does this plugin need the Url Mixin?
This plugin uses the Url Mixin to expose custom API endpoints which are conform with KiCads REST API requirements.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for inventree-kicad-plugin-1.2.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e093399ad04011a375f9da4a39ea43ec411a3c12827ba0333caecf41a715e64 |
|
MD5 | 0fbc39f9b25258f9cb6ef13d301d03ee |
|
BLAKE2b-256 | 4925f3324f291260b407ecab42392a8c0aa1ffc40246efd852b2e3df5dc12f52 |
Hashes for inventree_kicad_plugin-1.2.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c244340f55448ed789c250bd41c8f728d943c55235d8a9ba483e618cce35cfd0 |
|
MD5 | 9de1f2bc474f9b361e2e53f780fe471e |
|
BLAKE2b-256 | f34c94c6d8d0880768dc460535b4908a2234b00c47c40d5e0691158c080e3e01 |