Skip to main content

Python client library for LocationIQ Gecoding Services

Project description

LocationIQ Python geocoder

Python client library for LocationIQ Gecoding Services

Usage

LocationIQ python client library can be installed using pip:

$ pip install locationiq

Load the locationiq geocoding module using the below line:

from locationiq.geocoder import LocationIQ

Now create a instance of the geocoder module, pass the LocationIQ API Token as the parameter to module’s constructor.

geocoder = LocationIQ(key)

Forward Geocoding

To convert the street addresses into geographic coordinataes (latitude and longitude)

geocoder.geocode(‘Charminar Hyderabad’)

Reverse Geocoding

To convert geographic coordinates into street addresses

geocoder.reverse_geocoder(17.3850, 78.4867)

Exceptions

if there is any error, below exceptions will be raised.
  • LocationIqNoPlacesFound if there are no matching results
  • LocationIqInvalidKey If the provided api_key is invalid.
  • LocationIqInvalidRequest If you go past your rate limit.
  • LocationIqRequestLimitExeceeded If you go past ratelimits.
  • LocationIqServerError occurs basically when there’s server error

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for locationiq, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size locationiq-0.0.2-py3-none-any.whl (6.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size locationiq-0.0.2.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page