An easy-to-use Python wrapper for the Google Maps and Local Search APIs.
Geocoding: convert a postal address to latitude and longitude
>>> from googlemaps import GoogleMaps >>> gmaps = GoogleMaps(api_key) >>> address = 'Constitution Ave NW & 10th St NW, Washington, DC' >>> lat, lng = gmaps.address_to_latlng(address) >>> print lat, lng 38.8921021 -77.0260358Reverse Geocoding: find the nearest address to (lat, lng)
>>> destination = gmaps.latlng_to_address(38.887563, -77.019929) >>> print destination Independence and 6th SW, Washington, DC 20024, USALocal Search: find places matching a query near a given location
>>> local = gmaps.local_search('cafe near ' + destination) >>> print local['responseData']['results'][0]['titleNoFormatting'] Vie De France Bakery & CafeDirections: turn-by-turn directions, distance, time, etc. from point A to point B
>>> directions = gmaps.directions(address, destination) >>> print directions['Directions']['Distance']['meters'] 1029 >>> print directions['Directions']['Duration']['seconds'] 106 >>> for step in directions['Directions']['Routes'][0]['Steps']: ... print step['descriptionHtml'] Head <b>east</b> on <b>Constitution Ave NW</b> toward <b>9th St NW</b> Take the 2nd <b>right</b> onto <b>7th St NW</b> Turn <b>left</b> at <b>Independence Ave SW</b>This software is in no way associated with or endorsed by Google Inc. Use of the Google Maps API is governed by its Terms of Service: http://code.google.com/apis/maps/terms.html. Note in particular that you will need your own Google Maps API key to use this service, and that there are rate limits to the number of requests you can make.
Release files for googlemaps 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| googlemaps-1.0.2.tar.gz | 60.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| googlemaps-1.0.2.win32.exe | Details |
Total release size: 132.5 kB
Release files / googlemaps-1.0.2.tar.gz
| Download URL | googlemaps-1.0.2.tar.gz |
|---|---|
| Size | 60.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7af5a39fec024446902988ac2491996004dbc7354c37065b82d7d07f89b0ce5c
|
|
BLAKE2b-256 checksum How to use checksums |
a0deb8d19fac34a080e9c4db877db33fd5bbc6a98e19c2d9e70bf01c346a8655
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / googlemaps-1.0.2.win32.exe
| Download URL | googlemaps-1.0.2.win32.exe |
|---|---|
| Size | 71.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00571c6e79f6387d5cebef0f766d2b23965c6420287dab63af42327fa823425d
|
|
BLAKE2b-256 checksum How to use checksums |
784a1a65271ec41560163b0cf597ea011a78d65c7d7c0e36b04b1df60f56c606
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |