arthurdejong / python-stdnum

A Python library to provide functions to handle, parse and validate standard numbers.
https://arthurdejong.org/python-stdnum/
GNU Lesser General Public License v2.1
498 stars 206 forks source link

Postal code data #192

Open PanderMusubi opened 4 years ago

PanderMusubi commented 4 years ago

Might be interesting to have a look at https://bitbucket.org/flyingcircus/pycountry/issues/13411/please-add-a-postal-codes-database for the postal code data at Unicode.

arthurdejong commented 4 years ago

It seems that the original file that was contributed is no longer part of the repository and was deprecated some time ago. It seems it was originally contributed by Google but I'm unsure if there is some maintained version somewhere. The Universal Postal Union does seem to provide some information but I'm unsure if there is some parsable format. Wikipedia has a list of postal codes but it is marked as incomplete.

Having said that I would welcome contributions for additional postal codes in python-stdnum. I get the feeling that python-stdnum would not really be the place to implement the full S42 or S53 addressing standard but have no problem with being proven wrong ;)

pokoli commented 4 years ago

Geonames has a public postalcode database that can be downloaded as CSV format. Everything is explained on it's website:

https://download.geonames.org/export/