Sorry to add another PR while the former one is still pending, but I wanted to have this at least in my own fork, and it seemed to me a worthy contribution as well. This commit includes the setup.py and other changes from @svartalf, plus also replaces the six.moves.urllib with the Requests module. Requests is not only sexier (i.e. more modern and humane) but also addresses an issue I have been experiencing where I was getting intermittent "Missing or invalid key" errors from the urllib-driven request. As I was passing a key that I could verify using curl against the API, I'm not clear what was actually going on there, but I haven't seen it since switching to Requests.
If this seems worthy, you may just want to merge this one and skip #2, but I leave that to your discretion.
Thanks for the great geocoding system and for your consideration.
Sorry to add another PR while the former one is still pending, but I wanted to have this at least in my own fork, and it seemed to me a worthy contribution as well. This commit includes the
setup.py
and other changes from @svartalf, plus also replaces thesix.moves.urllib
with the Requests module. Requests is not only sexier (i.e. more modern and humane) but also addresses an issue I have been experiencing where I was getting intermittent "Missing or invalid key" errors from the urllib-driven request. As I was passing a key that I could verify usingcurl
against the API, I'm not clear what was actually going on there, but I haven't seen it since switching to Requests.If this seems worthy, you may just want to merge this one and skip #2, but I leave that to your discretion.
Thanks for the great geocoding system and for your consideration.