symerio / pgeocode

Postal code geocoding and distance calculation
https://pgeocode.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
238 stars 58 forks source link

Add default var for download url #63

Closed mateusz-koziel closed 1 year ago

mateusz-koziel commented 2 years ago

Add usage value of PGEOCODE_DOWNLOAD_URL environment variable as DOWNLOAD_URL. If variable does not exist, DOWNLOAD_URL is set up as was until now, with default web-links.

mateusz-koziel commented 2 years ago

@rth Please review.

rth commented 1 year ago

Thanks for the proposal! Why can't you set it at runtime without using an env variable?

import pgeocode
pgeocode.DOWNLOAD_URL = ["<your-url>"]

So overall I'm not sure what's the use case for this. Another issue with the current implementation is that DOWNLOAD_URL is a list while an env variable is a string, so it would need to be converted to a list somehow.

Closing, as I'm not convinced by this use. However don't hesitate to comment if you disagree.