Scripts that help fill in PCBA parameters using the Digikey API and an offline .xlsx file.
This will really only be useful as a starting point for other projects since my use case is very specific and the .xlsx file is not included.
- Install Python 3.10.9 or higher
- Install pip
- Install dependencies:
pip install -r requirements.txt
- Create
digikey_api_key.txt
in thedigikey_cache
directory - Copy your offline .xlsx into the root directory
- Create a digikey account
- Login as a developer
- Note that a Sandbox app will not work! It must be a Production app. Even if you specify Sandbox in
digikey_api.py
, the results will be fixed to the demo data.
- Note that a Sandbox app will not work! It must be a Production app. Even if you specify Sandbox in
- Click
Organizations
in the top right - Click
Create Organization
and follow the prompts - Click the newly created organization
- Go to the
Production Apps
tab - Click
Create Production App
and follow the prompts- The callback URL must be
https://localhost:8139/digikey_callback
- Turn on the radio button for
Product Information
(The first one)
- The callback URL must be
- Click the newly created app
- Show the
Client ID
andClient Secret
- Copy them (Each on their own line and in that order) into
digikey_api_key.txt
and save
- Update the
this_sheet_name
inalitum_helper.py
to match the name of the KiCad BOM sheet in your .xlsx file - Run
python alitum_helper.py
- If prompted to provide a new mfn, lookup the problematic mfn and provide a more suitable Digikey mfn
- Note if a
Manual check required for
message is displayed at the end - Open the generated .xlsx and verify its contents
- Copy and paste the contents into its future home
- There is a daily rate limit of 1000 requests per day for the Digikey API