Skip to content

Support configuring HTTP / HTTPS proxy #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yutayamate
Copy link

Hi Domo team,

I found current version of the SDK does not have support for configuring HTTP / HTTP proxy, which is necessary for communicating with the API from enterprise networks where outbound traffic to the Internet is ristricted.

I've tried adding new parameters (proxies and verify) to do this. It would be great if your team could review this PR. Thank you!

from pydomo import Domo

proxies = {'https': 'http://someproxy:8080'}
ssl_verify = False

domo = Domo(client_id='*****', client_secret='*****', proxies=proxies, verify=ssl_verify)

@@ -15,12 +15,14 @@ class DomoAPITransport:
serialization and deserialization of objects.
"""

def __init__(self, client_id, client_secret, api_host, use_https, logger, request_timeout):
def __init__(self, client_id, client_secret, api_host, use_https, logger, request_timeout, proxies, verify):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (112 > 79 characters)


if kwargs.get('log_level'):
self.logger.setLevel(kwargs['log_level'])
self.logger.debug("\n" + DOMO + "\n")

self.transport = DomoAPITransport(client_id, client_secret, api_host, kwargs.get('use_https', True), self.logger, request_timeout = timeout)
self.transport = DomoAPITransport(client_id, client_secret, api_host, kwargs.get('use_https', True), self.logger, request_timeout = timeout, proxies = proxies, verify = verify)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (184 > 79 characters)
E251 unexpected spaces around keyword / parameter equals

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants