Skip to content

Ability to add proxies setting #128

@collaer

Description

@collaer
Issue type
  • Feature Idea
    I looked and wasn't able to find an answer to my question, I beleive it could be a new feature?
OverPy version
0.7

Python version

  • Python 3.5
Summary

I have an http proxy that can't be automatically resolved by urllib, I can export proxy_http variables etc. so I can't use overpy in that environment since it will throw and error (URLError: <urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>)

Steps to reproduce

normal use of overpy

Expected results

Being able to configure a proxy or list of proxies to use, like this:

proxies = {'http':'http://username:password@proxy-source-ip:proxy-port',
           'https':'https://username:password@proxy-source-ip:proxy-port'}

Then being able to use them for a query or initiating the API:

self.api = overpy.Overpass(
  max_retry_count=10,
  retry_timeout=60*5,
  proxies=proxies,
)

or

api.query(qry, proxies=proxies,)
Actual results

New config will be used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions