peeter123 / digikey-api

Python module for the Digikey PartSearch API
GNU General Public License v3.0
85 stars 35 forks source link

Allow for variables to be fed in instead of using OS environment variables #14

Open Electro707 opened 3 years ago

Electro707 commented 3 years ago

As the title says, this library should allow for some information like client-id to be fed into it with the user application instead of using environment variables. Then these variables can be stored in the library's configuration file. The configuration file as well should be given to the library as an argument instead of using an environment variable.

Electro707 commented 3 years ago

Started work on this in my branch: https://github.com/Electro707/digikey-api/tree/json_config_storage So far for V3 it's working. I don't plan on updating the V2 code to handle this tough. Still needs to have the OAuth API save the tokens to the config file (right now it saves it in a temporary file in /tmp/dk_config) Done, although some more work needs to be done before it can be potentially merged upstream

eeintech commented 3 years ago

I would like to see this too :smiley: Can you create a PR?

Electro707 commented 3 years ago

Yup, created under #15. Set as a WIP as more things needs to be done before it can be merged upstream, some things up for discussion.