Skip to main content

Module to interact with Mouser's Search API

Project description

PyMouser

Installation

Install the package with pip.

pip install --user pymouser

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


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.8.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

pymouser-0.8-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page