kanboard / python-api-client

Python API Client for Kanboard
https://pypi.org/project/kanboard
MIT License
79 stars 26 forks source link

Use more flexible requests library #1

Closed PeterMosmans closed 6 years ago

PeterMosmans commented 7 years ago

Add support for additional HTTP Basic authorization. Add support for proxies. Add support for (disabling) SSL verification.

The reason behind using requests is that it's much easier to add support for proxies, disabling SSL verification, and additional authorization. If kanboard is behind HTTP Basic Auth, this enables you to use both authorizations at the same time.

fguillot commented 7 years ago

Yes, I know that requests is more flexible but you introduce a new dependency. If someone use this library in a project that already use requests with a different version you could end up with a dependency hell.

PeterMosmans commented 7 years ago

Hi @fguillot thanks for your reply.

I swapped the urllib library because it was in my humble opinion the cleanest way to add HTTP Basic Authentication, proxy support and flexible SSL verification in a Python2 and Python3 compatible way. Especially proxies is not easy to do with the standard urllib. With regards to 'dependency hell': it works with any version of the requests library, and, I suspect/hope/think that most people will use virtual environments anyway for their Python products.

Does this convince you ? :wink:

Thanks in advance,

Peter

PeterMosmans commented 7 years ago

Hi @fguillot - is there any chance that you merge this patch ? If not, please let me know, then a fork would make sense (although I sincerely hope it could make it into your "official" repo).

Thanks,

Peter