From 814d0c96516d6c77af992666ee4aeada1346a2ab Mon Sep 17 00:00:00 2001 From: eeintech Date: Sun, 29 Dec 2024 14:02:29 -0500 Subject: [PATCH] Test DK API #3 --- kintree/search/digikey_api.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kintree/search/digikey_api.py b/kintree/search/digikey_api.py index fb5c9b1a..4a852fec 100644 --- a/kintree/search/digikey_api.py +++ b/kintree/search/digikey_api.py @@ -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):