inventree / inventree-python

Python library for communication with inventree via API
https://docs.inventree.org/en/latest/api/python/python/
MIT License
26 stars 34 forks source link

Support requests proxies feature #168

Closed T0jan closed 1 year ago

T0jan commented 1 year ago

Hi,

For remote access to the server proxies are an easy way to ease setup on the clients machines. With a short view into the InvenTreeAPI class of api.py I saw that you use the requests package for handling the actual server operations but as far as I understand you do not support the definition of proxies as of now?

Adding support for proxies would mean the introduction of an new kwarg proxies in the init of the class a definition of the argument if it is not given by the user as an empty dictionary and an addition of the argument proxies=self.proxies to any request done.

SchrodingersGat commented 1 year ago

@T0jan makes sense - are you able to submit a PR for this functionality?

T0jan commented 1 year ago

@SchrodingersGat I think so. I will try with my own server in the next days anyway and then commit the changes here.