vfilimonov / pydatastream

Python interface to the Refinitiv Datastream (former Thomson Reuters Datastream)
MIT License
71 stars 30 forks source link

Use behind a proxy #5

Closed alastairbs closed 8 years ago

alastairbs commented 8 years ago

Could you add some arguments to the initial Datastream allowing use behind a proxy. You could then add the argument "proxy={'http':'proxyLocaion:portNumber'}" to your suds.client call when the Datastream object is instantiated.

vfilimonov commented 8 years ago

Hello,

thanks for the suggestion!

Could you please try it on your side and submit a PR? I don't have a proxy set to try, and things might be more complicated than an extra parameter - so a proper testing is needed.

Best Vladimir

vfilimonov commented 8 years ago

I've added a proxy parameter (313fc7b) via client.set_options - hopefully it works. It's in the develop branch - please test it before I merge it to master.

alastairbs commented 8 years ago

That change fails with a URL not found error from the initial "suds.client.Client" call. I proposed a change to your update in the develop branch which keeps your validation and adds the proxy details to the initial "suds.client.Client" call. I have tested the updated code and it works fine through a proxy.

vfilimonov commented 8 years ago

OK, I pulled it. So eventually we don't need extra client.set_options...

vfilimonov commented 8 years ago

Done. Now the updated version is in master and uploaded to pypi. I'm closing the issue for now.

@alastairbs, thank you very much for the help!