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

Add proxy support #169

Closed T0jan closed 1 year ago

T0jan commented 1 year ago

Added proxy support to all requests. I did not bother adding unit tests for this feature as I think this feature is to user setup specific to catch it with unit tests. I did run the existing unit test to see if it breaks something without using proxies (it did not) and tested the proxy features manually.

Closes #168

SchrodingersGat commented 1 year ago

@T0jan looks reasonable - have you tested locally?

Also please address style issues :)

T0jan commented 1 year ago

@SchrodingersGat

have you tested locally?

yeah I have a setup where I can test direct connection as well as via proxy. I checked all API class functions in both scenarios and also what happens if the wrong proxy configuration is given (the standard Could not connect to InvenTree server as intended)

Also please address style issues :)

style errors should be fixed now

SchrodingersGat commented 1 year ago

Thanks for the additions @T0jan - I'll release a new version to pypi shortly