Geopy is a Python package providing a simple interface to convert place names to coordinates and perform basic ellipsoidal geometry. Here's an excerpt from the tutorial:
from geopy import geocoders, distance g = geocoders.Google() ny,(ny_lat,ny_lng) = g.geocode('New York, NY')
nas,(nas_lat,nas_lng) = g.geocode('Nassau, Bahamas')
distance.distance((ny_lat, ny_lng), (nas_lat, nas_lng)).nautical 952.2940284055431