0

I'm running a python program on pythonanywhere.com.

So far I used requests.get() for my API calls.

However I'd now like to use aiohttp to improve performance and make concurrent API calls.

My problem is that, in pythonanywhere, requests() is configured in such a way to use a proxy, which has a whitelist (this is not a problem as my API server is in the whitelist).

However aiohttp uses direct web socket connection, and the proxy is then not set, resulting in a connect error.

How can I use aiohttp on pythonanywhere with a free account and configure the aiohttp proxy in the same way requests seems to be configured ?

Thanks

luke
  • 61
  • 1
  • 5
  • 1
    Free accounts on PythonAnywhere can't use socket connections. – Filip Sep 22 '20 at 08:11
  • So there's no solution? I can't have async requests in PythonAnywhere? – luke Sep 22 '20 at 08:35
  • 1
    You can, with the paid account and not in the web app. – Filip Sep 22 '20 at 09:16
  • Well I meant with the free account. Is there any other alternative to pythonanywhere that's free, doesn't require a credit card and lets you run python code ? – luke Sep 22 '20 at 09:18

0 Answers0