seanpianka / Zipcodes

A simple library for querying U.S. zipcodes.
MIT License
78 stars 15 forks source link

Issue with zipcode 60418 #4

Closed crsharat closed 4 years ago

crsharat commented 4 years ago

Hi,

I'm still using this package to validate some zip codes list. But it does not validate a particular zip code 60418.

As mentioned in the comment, of https://github.com/seanpianka/Zipcodes/issues/3#issuecomment-497867390, that zipcodes details are used within the free version of the download from here. So I downloaded the csv and checked whether the 60418 exists in it or not and yes it does.

Screenshot from 2019-10-09 16-34-21

crsharat commented 4 years ago

@seanpianka I have a suggestion that we should provide the latest zipcode file from the main database when the user installs the package.

seanpianka commented 4 years ago

@crsharat I would prefer to avoid making any network requests in a zipcode lookup package.

See the latest changes, they resolve this issue:

>>> import zipcodes
>>> zipcodes.__version__
'1.1.0'
>>> zipcodes.matching("60418")
[{'zip_code': '60418', 'zip_code_type': 'STANDARD', 'active': True, 'city': 'Crestwood', 'acceptable_cities': [], 'unacceptable_cities': [], 'state': 'IL', 'county': 'Cook County', 'timezone': 'America/Chicago', 'area_codes': [], 'world_region': 'NA', 'country': 'US', 'lat': '41.6539', 'long': '-87.7523'}]