pip install octopart
export OCTOPART_API_KEY="secret"
import octopart
mpns = ['6ET1']
results = octopart.match(mpns)
print(results[0].parts[0])
# <Part mpn=6ET1>
print(results[0].parts[0].manufacturer)
# 'TE Connectivity / Corcom'
print(results[0].parts[0].offers[0])
# <Offer sku=CCM1604-ND seller=Digi-Key in_stock_quantity=220>
python -m pytest --cov=octopart --doctest-modules --ignore=setup.py
python -m mypy octopart --ignore-missing-imports
octopart
is an Octopart API client for Python 3.6+. API response data is returned as Python objects that attempt to make it easy to get the data you want. Not all endpoints have been implemented.
octopart.match()
octopart.search()
octopart.get_seller()
octopart.search_seller()
octopart.get_category()
octopart.search_category()
octopart.get_brand()
octopart.search_brand()
octopart.models.PartsMatchResult
octopart.models.PartsSearchResult
octopart.models.Part
octopart.models.PartOffer
octopart.models.Seller
octopart.models.Category
octopart.models.Brand