Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 942d936

Browse files
committed
Initial Commit
0 parents  commit 942d936

File tree

7 files changed

+84
-0
lines changed

7 files changed

+84
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea/
2+
*.pyc
3+
.pypirc

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Kwabena Asante
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# heregeocoder - Python wrapper for Here.com Geocoder API!
2+

heregeocoder/GeocoderApi.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import requests
2+
3+
class GeocoderApi:
4+
def __init__(self, api_key):
5+
self.api_key = api_key
6+
self.base_url = "https://geocoder.ls.hereapi.com/6.2/geocode.json"
7+
8+
def search(self, search_text):
9+
response = requests.get(
10+
self.base_url,
11+
params={
12+
'searchtext': search_text,
13+
'apiKey': self.api_key
14+
},
15+
headers={'Accept': 'application/json'},
16+
)
17+
return response
18+

heregeocoder/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from heregeocoder.GeocoderApi import GeocoderApi

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[metadata]
2+
description-file = README.md

setup.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
from distutils.core import setup
2+
setup(
3+
name = 'heregeocoder',
4+
packages = ['heregeocoder'],
5+
version = '0.10',
6+
license='MIT',
7+
description = 'Here Geocoder API wrapper',
8+
author = 'Kwabena Asante',
9+
author_email = '[email protected]',
10+
url = '',
11+
download_url = '',
12+
keywords = ['here', 'geocoder', 'api'],
13+
install_requires=[
14+
'requests',
15+
],
16+
classifiers=[ # Optional
17+
# How mature is this project? Common values are
18+
# 3 - Alpha
19+
# 4 - Beta
20+
# 5 - Production/Stable
21+
'Development Status :: 3 - Alpha',
22+
23+
# Indicate who your project is intended for
24+
'Intended Audience :: Developers',
25+
'Topic :: Software Development :: Build Tools',
26+
27+
# Pick your license as you wish
28+
'License :: OSI Approved :: MIT License',
29+
30+
# Specify the Python versions you support here. In particular, ensure
31+
# that you indicate whether you support Python 2, Python 3 or both.
32+
'Programming Language :: Python :: 3',
33+
'Programming Language :: Python :: 3.6',
34+
'Programming Language :: Python :: 3.7',
35+
'Programming Language :: Python :: 3.8',
36+
],
37+
)

0 commit comments

Comments
 (0)