HERE Location Services for Python
Project description
HERE Location Services for Python
A Python client for HERE Location Services.
Usage
Geocoding using HERE Geocoding & Search API.
Prerequisites
Before you can install HERE Location Services for Python
, run its test-suite, or use the example notebooks to make sure you meet the following prerequisites:
- A Python installation, 3.6+ recommended, with the
pip
command available to install dependencies. - A HERE developer account, freely available under HERE Developer Portal.
- An API key from the HERE Developer Portal, in an environment variable named
LS_API_KEY
which you can set like this (with a valid value, of course):$ export LS_API_KEY="MY-LS-API-KEY"
Installation
-
Install
HERE Location Services for Python
from PyPI using the below command:$ pip install here-location-services
-
Install
HERE Location Services for Python
from GitHub using the below command:$ pip install -e git+https://github.com/heremaps/here-location-services-python#egg=here-location-services
Run Test Suite
To run the test suite you can do this locally, which should provide a test coverage of 100%:
$ pip install -r requirements_dev.txt
$ pytest -v --cov=here_location_services tests
Documentation
Documentation is available here.
Run the below commands to build the docs locally:
$ pip install -e .
$ pip install -r requirements_dev.txt
$ sh scripts/build_docs.sh
Hello World Example
This is a tiny "Hello World" like example that you can run to geocode the given address right away. Just make sure to use your own real API key.
import json
import os
from here_location_services import LS
LS_API_KEY = os.environ.get("LS_API_KEY") # Get API KEY from environment.
ls = LS(api_key=LS_API_KEY)
address = "Invalidenstr 116, 10115 Berlin, Germany"
geo = ls.geocode(query=address)
print(json.dumps(geo.to_geojson(), indent=2, sort_keys=True))
License
Copyright (C) 2019-2021 HERE Europe B.V.
See the License file in the root of this project for license details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file here-location-services-0.1.0.tar.gz
.
File metadata
- Download URL: here-location-services-0.1.0.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9aee8d0a05f5f05d850bf7aefb55e15676f0525038cdaf037af5ec2e63948405 |
|
MD5 | 35b0c8c1291caea1263c191b0e4838f6 |
|
BLAKE2b-256 | 4d507504f545aaeb27d2b9079de215305b32286db9845ad36b6bcf6133825571 |
File details
Details for the file here_location_services-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: here_location_services-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 585a43a90ed5d1620e08a1654356f2ea9a40383fa960a060ceb21bbdd6d9e064 |
|
MD5 | af8557e7a951ca3bb486e1f72b238162 |
|
BLAKE2b-256 | ef07fd65297764fbf3c3a821faef86ec186c3a6fb2996b52c81abbb9c5decaf9 |