Closed m01010011 closed 5 years ago
There is no option to do this currently.
However, if your concern is keeping the connection open for up to 600 seconds, I have good news - the Requests library does not apply a timeout on requests by default. In hindsight, we should probably have a timeout included on the requests from pygeocodio
however in this case it means you can keep your connections open for 600 seconds... or 600,000!
A great idea for a PR would be to apply a default timeout, allow it to be overridden when initializing the client, and possibly also individual library API calls as suggested in your own comment.
According to their documentation,
I checked the code for
pygeocodio
, but couldn't find an option to specify the time limit, especially in case we're requesting for several addresses.The
kwargs
inbatch_geocode(self, addresses, **kwargs)
seems to be a good place for specifying the option.