Module to interact with Mouser's Search API
Project description
PyMouser
Installation
Installation with pip
is coming soon. Meanwhile, clone the repository, cd into it, and run:
pip install --user -e .
Usage:
import pymouser
# Initialize the package with your API key
mouser = pymouser.MouserAPI('your-search-key')
# Search by Part-Number
err, res = mouser.search_by_PN('your-part-number')
# Check for errors or print the returned results
if err:
print("Error during request:")
print(err)
else:
if res['NumberOfResult'] == 0:
print("No results matched the part number")
else:
for match in res['Parts']:
print("Match for PartNumber .... %s" % match['MouserPartNumber'])
print("Description ............. %s" % match['Description'])
print("Link to datasheet ....... %s" % match['DataSheetUrl'])
print("Link to product page .... %s" % match['ProductDetailUrl'])
print("")
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
pymouser-0.7.tar.gz
(2.8 kB
view hashes)
Built Distribution
pymouser-0.7-py3-none-any.whl
(3.2 kB
view hashes)