I have my scripts ready to manage users in google however I can't find anyway to use a proxy with httplib2, as such I am constantly switching to mobile to avoid doing tasks by hand.
For refrence all code comes from the quickstart : https://developers.google.com/admin-sdk/directory/v1/quickstart/python
Simplified to:
credentials = gi.get_credentials()
http = credentials.authorize(httplib2.Http())
service = gi.discovery.build('admin', 'directory_v1', http=http)
print('Starting user OU management')
I have found this but it doesn't seem to work for HTTP proxy
http = credentials.authorize(httplib2.Http(httplib2.ProxyInfo(httplib2.socks.PROXY_TYPE_HTTP_NO_TUNNEL, 'proxy.example.com', 8080, proxy_user = 'username', proxy_pass = 'password') ))
Proxy information:
- Host: wpad
- port: 8080
- Same proxy for both HTTP and HTTPS traffic
- No auth
EDIT: found this https://github.com/jcgregorio/httplib2/wiki/Examples-Python3
Proxy support is unavailable until the third-party socks module is ported to Python 3.
So are there any other http libraries that I can use??
Thanks
EDIT 2: Spoke to google and apparently 3.5 isn't supported at all, however this doesn't solve my httplib2 problem with python 3.*