Skip to content

Commit

Permalink
Test DK API #3
Browse files Browse the repository at this point in the history
  • Loading branch information
eeintech committed Dec 29, 2024
1 parent a60aa2c commit 814d0c9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kintree/search/digikey_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,16 @@ def fetch_part_info(part_number: str) -> dict:

# THIS METHOD CAN SOMETIMES RETURN INCORRECT MATCH
# Added logic to check the result in the GUI flow
@timeout(dec_timeout=20)
# @timeout(dec_timeout=20)
def digikey_search_timeout():
return digikey.product_details(
product_data = digikey.product_details(
part_number,
x_digikey_locale_site=os.environ['DIGIKEY_LOCAL_SITE'],
x_digikey_locale_language=os.environ['DIGIKEY_LOCAL_LANGUAGE'],
x_digikey_locale_currency=os.environ['DIGIKEY_LOCAL_CURRENCY'],
).to_dict()
print(f'{product_data=}')
return product_data

# Method to process price breaks
def process_price_break(product_variation):
Expand Down

0 comments on commit 814d0c9

Please sign in to comment.