Skip to content

Proxy support in OWSLib#927

Closed
FilippoPagano wants to merge 6 commits into
geopython:masterfrom
FilippoPagano:master
Closed

Proxy support in OWSLib#927
FilippoPagano wants to merge 6 commits into
geopython:masterfrom
FilippoPagano:master

Conversation

@FilippoPagano
Copy link
Copy Markdown

Hello,

I added proxy support for the library.

#512

Let me know

Regards,
Filippo Pagano
Software engineer

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 6, 2024

This Pull Request has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days.

@github-actions github-actions Bot added the stale label Oct 6, 2024
@geographika
Copy link
Copy Markdown
Contributor

Thanks for this @FilippoPagano.

Would you be able to add the :param proxies to the docstring of openURL, and also the other functions where it has been added and the other parameters are documented?

For reference, this pull request passes the proxies to the requests library: https://requests.readthedocs.io/en/latest/user/advanced/#proxies

@github-actions
Copy link
Copy Markdown

This Pull Request has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days.

@github-actions github-actions Bot added the stale label Jan 19, 2025
@geographika
Copy link
Copy Markdown
Contributor

Note even without this pull request it should be possible to use proxies by setting environment variables as described at https://docs.python-requests.org/en/latest/user/advanced/#proxies

$ export HTTP_PROXY="http://10.10.1.10:3128"
$ export HTTPS_PROXY="http://10.10.1.10:1080"
$ export ALL_PROXY="socks5://10.10.1.10:3434"

$ python
>>> import requests
>>> requests.get('http://example.org')

@FilippoPagano
Copy link
Copy Markdown
Author

FilippoPagano commented Jan 26, 2025 via email

@github-actions github-actions Bot removed the stale label Feb 2, 2025
@tomkralidis
Copy link
Copy Markdown
Member

Ye,s but this PR is usefull when you want to specify a proxy for a specific call, and not at a system level… so your other services can run regularly Il giorno dom 26 gen 2025 alle 10:47 Seth G @.> ha scritto:

Note even without this pull request it should be possible to use proxies by setting environment variables as described at https://docs.python-requests.org/en/latest/user/advanced/#proxies $ export HTTP_PROXY="http://10.10.1.10:3128" $ export HTTPS_PROXY="http://10.10.1.10:1080" $ export ALL_PROXY="socks5://10.10.1.10:3434" $ python>>> import requests>>> requests.get('http://example.org') — Reply to this email directly, view it on GitHub <#927 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB25KMARZUR2DYO3IHK4TS32MSVJVAVCNFSM6AAAAABH2MOC66VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJUGMYDCMRZGA . You are receiving this because you were mentioned.Message ID: @.
>

Note that you can also set this at the application level without a change to OWSLib:

import os
import requests

os.environ['HTTP_PROXY'] = 'http://foo'

print(requests.get('http://example.org'))

@geographika
Copy link
Copy Markdown
Contributor

@FilippoPagano - thanks for the pull request. However, I think the options outlined above should be sufficient for most use-cases. I've added these options to the docs in #975.

If per-request proxy support is important to you, this can be reconsidered. The pull request would need to be rebased against master, and docstring params added to all changed function definitions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants