AeybelV / PartPal

A tool for generating, optimizing, management, and sharing of Bills of Materials (BOMs). Integrates with EDA tools to streamline component sourcing and assembly workflows.
GNU General Public License v3.0
5 stars 0 forks source link

Digikey API #4

Closed AeybelV closed 3 months ago

AeybelV commented 3 months ago

Register and setup API access for Digikey, otherwise resort to web scraping. Should be able to interact with Digikey to query for part data and prices. As well as generate carts and get shipping data.

AeybelV commented 3 months ago

digikey.webm

Partpal can read in a config file (partpal.json) containing Digikey client id's and secrets. Using the Digikey ProductInformation (v4) -> ProductSearch API, we can get details about a product when given

  1. A DigiKey P/N
  2. A Manafacturer P/N

pytests can be found in tests/distributors, and run by

# in repo root
export PYTHONPATH=$(pwd)
pytest tests/distributor # Add -s flag if you wish to see the query response