google-cloud-python icon indicating copy to clipboard operation
google-cloud-python copied to clipboard

Proxy settings without env variables.

Open mitsuo0114 opened this issue 4 years ago • 3 comments

Hi, This is almost same as below issue, but to make title more general, please allow me to create this issue. https://github.com/googleapis/google-cloud-python/issues/5348

When we want to change proxy setting (from internal network) with this library, we need to change global env variables Like export HTTPS_PROXY=http://xx.xx.xx.xx in bash, os.environ["HTTPS_PROXY"]= "http://xx.xx.xx.xx" in python.

That affect to other threads and it is painful for me.

Actually, another python library[1] allows us to use local proxy with configuring httplib2. This doesn't affect to other threads. The maintainers of [1] recommend us to use this google-cloud-python in Readme. But this proxy issue is the one of the biggest issue and we cannot migrate actually.

I hope team enable us to set proxy without changing global data but by passing argument etc. (Actually, I have already communicated Google Cloud Support )

[1] https://github.com/googleapis/google-api-python-client

mitsuo0114 avatar Sep 01 '21 04:09 mitsuo0114

Hi @mitsuo0114,

Thank you for opening an issue. The Google Cloud libraries use gRPC under the hood, so the easiest way to set proxy settings is to do so through one of the gRPC environment variables.

@lidiz Is there a way to set proxy settings for gRPC without using the env vars? I took a pass through MD files in https://github.com/grpc/grpc but was not able to find anything.

busunkim96 avatar Sep 01 '21 15:09 busunkim96

Googlers, corresponding internal bug is b/198355620.

busunkim96 avatar Sep 07 '21 23:09 busunkim96

Are there any news regarding this feature request?

girolamodaschio avatar Nov 21 '23 14:11 girolamodaschio