Skip to content
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

How to set proxy for pdpyrsa #47

Closed
zelong430 opened this issue Nov 19, 2020 · 2 comments
Closed

How to set proxy for pdpyrsa #47

zelong430 opened this issue Nov 19, 2020 · 2 comments

Comments

@zelong430
Copy link

Our enterprise network require to use a proxy to access https://api.pagerduty.com. I can't find a way to set the proxy for EventAPISession. Can someone here provide some helps our point me to the correct instructions/docs?

@badnetmask
Copy link

pdpyrsa uses the Python requests library. I am unable to test right now, but I would suggest that you try environment variables, like explained in the documentation. In theory, it should work just fine.

@zelong430
Copy link
Author

Hi Thanks for the reply,

I was able to get it work by something like:

session = pdpyras.EventsAPISession(CONFIG['our-pager-duty-key'])
session.proxies.update(PD_PROXY)

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

No branches or pull requests

3 participants