digikey-api icon indicating copy to clipboard operation
digikey-api copied to clipboard

updated to digikey v4 and python 3.12

Open hurricaneJoef opened this issue 1 year ago • 5 comments

hurricaneJoef avatar Jul 02 '24 21:07 hurricaneJoef

Hello @hurricaneJoef thanks for your work! Is your fork compatible with Python 3.10+ versions or is it exclusive to Python 3.12+ versions?

eeintech avatar Jul 03 '24 12:07 eeintech

I have not tested it yet on 3.10 but its not using anything specific to 3.12 or 3.11. please let me know if it does work

hurricaneJoef avatar Jul 03 '24 13:07 hurricaneJoef

Sounds good, thanks!

eeintech avatar Jul 03 '24 14:07 eeintech

@hurricaneJoef I am not able to install without the fixes in #47, would you be able to pull those in?

The error I get:

  File "/home/francois/development/Ki-nTree/kintree/search/digikey_api.py", line 3, in <module>
    import digikey
  File "/home/francois/development/Ki-nTree/.venv/lib/python3.12/site-packages/digikey/__init__.py", line 1, in <module>
    from digikey.v4.api import (keyword_search, product_details, digi_reel_pricing, suggested_parts,
  File "/home/francois/development/Ki-nTree/.venv/lib/python3.12/site-packages/digikey/v4/api.py", line 3, in <module>
    from distutils.util import strtobool
ModuleNotFoundError: No module named 'distutils'

eeintech avatar Oct 15 '24 16:10 eeintech

@eeintech @hurricaneJoef distutils can still be accessed via the setuptools package: https://stackoverflow.com/questions/77247893/modulenotfounderror-no-module-named-distutils-in-python-3-12

T0jan avatar Oct 15 '24 19:10 T0jan

Does anybody here know if there is a fork of this library being maintained that has both these changes and those from #47 merged in? @hurricaneJoef, @eeintech, @T0jan, @hvraven, @G-Pereira, @peeter123 Thanks

Edit: For now, I am switching to @hurricaneJoef's fork. Here are some commands to do that, in case anyone else wants to:

pip uninstall digikey-api
pip install git+https://github.com/hurricaneJoef/digikey-api.git

nabelekt avatar Nov 22 '24 05:11 nabelekt

Edit: For now, I am switching to @hurricaneJoef's fork. Here are some commands to do that, in case anyone else wants to:

pip uninstall digikey-api
pip install git+https://github.com/hurricaneJoef/digikey-api.git

That's the one we're using for Ki-nTree

eeintech avatar Nov 29 '24 19:11 eeintech

@hurricaneJoef @eeintech I am using your pull-request with python 3.12.8. digikey.keyword_search works fine but digikey.batch_product_details returns a TypeError: BatchSearchApi.batch_product_details_with_http_info() got multiple values for argument 'authorization'. Have you seen such an error before?

amosborne avatar Jul 09 '25 15:07 amosborne