4👍
You can give a try to pygeocoder. It’s a Python wrapper for Google’s Geocoding V3 API. It can fulfill some of your validation needs.
from pygeocoder import Geocoder
g = Geocoder()
g.geocode("1 wellington, ottawa").valid_address
>>> True
g.geocode("1 wellington, chicago").valid_address
>>> False
It can take some minor misspelling too
result = g.geocode("1600 amphiteather, mountain view")
result.valid_address
>>> True
print result
>>> 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA
g.geocode("16000000 amphitheater, mountain view").valid_address
>>> False
But Google doesn’t always have the right postal/zip code. USPS has a public API for the US I believe.
disclamer: I made pygeocoder
2👍
You could probably use a GeoCoding service (like Google’s) to verify that an address exists.
- [Django]-Django Markdown Editor does not show up
- [Django]-Mock a model method in Django
- [Django]-Django 1.7 and smart, deep, filtered aggregations
- [Django]-'tuple' object has no attribute – Django
Source:stackexchange.com