herepy 3.5.8__tar.gz → 3.6.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. herepy-3.6.1/PKG-INFO +195 -0
  2. herepy-3.6.1/herepy/__init__.py +65 -0
  3. {herepy-3.5.8 → herepy-3.6.1}/herepy/destination_weather_api.py +6 -5
  4. {herepy-3.5.8 → herepy-3.6.1}/herepy/error.py +8 -0
  5. {herepy-3.5.8 → herepy-3.6.1}/herepy/ev_charging_stations_api.py +5 -4
  6. {herepy-3.5.8 → herepy-3.6.1}/herepy/fleet_telematics_api.py +6 -6
  7. {herepy-3.5.8 → herepy-3.6.1}/herepy/geocoder_api.py +5 -4
  8. {herepy-3.5.8 → herepy-3.6.1}/herepy/geocoder_autocomplete_api.py +5 -4
  9. {herepy-3.5.8 → herepy-3.6.1}/herepy/geocoder_reverse_api.py +5 -4
  10. {herepy-3.5.8 → herepy-3.6.1}/herepy/here_api.py +1 -1
  11. {herepy-3.5.8 → herepy-3.6.1}/herepy/isoline_routing_api.py +7 -9
  12. {herepy-3.5.8 → herepy-3.6.1}/herepy/map_image_api.py +5 -4
  13. {herepy-3.5.8 → herepy-3.6.1}/herepy/map_tile_api.py +8 -12
  14. {herepy-3.5.8 → herepy-3.6.1}/herepy/models.py +2 -2
  15. {herepy-3.5.8 → herepy-3.6.1}/herepy/objects.py +3 -1
  16. {herepy-3.5.8 → herepy-3.6.1}/herepy/places_api.py +6 -5
  17. herepy-3.6.1/herepy/platform/__init__.py +1 -0
  18. herepy-3.6.1/herepy/platform/tour_planning_api.py +17 -0
  19. {herepy-3.5.8 → herepy-3.6.1}/herepy/public_transit_api.py +7 -9
  20. herepy-3.6.1/herepy/py.typed +0 -0
  21. {herepy-3.5.8 → herepy-3.6.1}/herepy/rme_api.py +5 -4
  22. {herepy-3.5.8 → herepy-3.6.1}/herepy/routing_api.py +28 -33
  23. {herepy-3.5.8 → herepy-3.6.1}/herepy/traffic_api.py +19 -19
  24. {herepy-3.5.8 → herepy-3.6.1}/herepy/utils.py +2 -3
  25. {herepy-3.5.8 → herepy-3.6.1}/herepy/vector_tile_api.py +5 -4
  26. herepy-3.6.1/herepy.egg-info/PKG-INFO +195 -0
  27. {herepy-3.5.8 → herepy-3.6.1}/herepy.egg-info/SOURCES.txt +23 -1
  28. herepy-3.6.1/herepy.egg-info/requires.txt +1 -0
  29. herepy-3.6.1/requirements.txt +1 -0
  30. herepy-3.6.1/setup.py +66 -0
  31. herepy-3.6.1/tests/test_destination_weather_api.py +212 -0
  32. herepy-3.6.1/tests/test_enum.py +609 -0
  33. herepy-3.6.1/tests/test_ev_charging_stations_api.py +175 -0
  34. herepy-3.6.1/tests/test_fleet_telematics_api.py +212 -0
  35. herepy-3.6.1/tests/test_geocoder_api.py +135 -0
  36. herepy-3.6.1/tests/test_geocoder_autocomplete_api.py +78 -0
  37. herepy-3.6.1/tests/test_geocoder_reverse_api.py +50 -0
  38. herepy-3.6.1/tests/test_isoline_routing_api.py +436 -0
  39. herepy-3.6.1/tests/test_map_image_api.py +154 -0
  40. herepy-3.6.1/tests/test_map_tile_api.py +75 -0
  41. herepy-3.6.1/tests/test_mercator_projection.py +14 -0
  42. herepy-3.6.1/tests/test_models.py +177 -0
  43. herepy-3.6.1/tests/test_places_api.py +105 -0
  44. herepy-3.6.1/tests/test_publictransit_api.py +414 -0
  45. herepy-3.6.1/tests/test_rme_api.py +53 -0
  46. herepy-3.6.1/tests/test_routing_api.py +1181 -0
  47. herepy-3.6.1/tests/test_traffic_api.py +471 -0
  48. herepy-3.6.1/tests/test_utils.py +31 -0
  49. herepy-3.6.1/tests/test_vector_tile_api.py +72 -0
  50. herepy-3.5.8/PKG-INFO +0 -192
  51. herepy-3.5.8/herepy/__init__.py +0 -106
  52. herepy-3.5.8/herepy.egg-info/PKG-INFO +0 -192
  53. herepy-3.5.8/herepy.egg-info/requires.txt +0 -1
  54. herepy-3.5.8/requirements.txt +0 -1
  55. herepy-3.5.8/setup.py +0 -60
  56. {herepy-3.5.8 → herepy-3.6.1}/COPYING +0 -0
  57. {herepy-3.5.8 → herepy-3.6.1}/LICENSE +0 -0
  58. {herepy-3.5.8 → herepy-3.6.1}/MANIFEST.in +0 -0
  59. {herepy-3.5.8 → herepy-3.6.1}/NOTICE +0 -0
  60. {herepy-3.5.8 → herepy-3.6.1}/README.rst +0 -0
  61. {herepy-3.5.8 → herepy-3.6.1}/herepy/here_enum.py +0 -0
  62. {herepy-3.5.8 → herepy-3.6.1}/herepy/mercator_projection.py +0 -0
  63. {herepy-3.5.8 → herepy-3.6.1}/herepy/polling.py +0 -0
  64. {herepy-3.5.8 → herepy-3.6.1}/herepy.egg-info/dependency_links.txt +0 -0
  65. {herepy-3.5.8 → herepy-3.6.1}/herepy.egg-info/top_level.txt +0 -0
  66. {herepy-3.5.8 → herepy-3.6.1}/setup.cfg +0 -0
herepy-3.6.1/PKG-INFO ADDED
@@ -0,0 +1,195 @@
1
+ Metadata-Version: 2.1
2
+ Name: herepy
3
+ Version: 3.6.1
4
+ Summary: A library that provides a Python interface to the HERE APIs
5
+ Home-page: https://github.com/abdullahselek/HerePy
6
+ Download-URL: https://pypi.org/pypi/herepy
7
+ Author: Abdullah Selek
8
+ Author-email: abdullahselek.os@gmail.com
9
+ Maintainer: Abdullah Selek
10
+ Maintainer-email: abdullahselek.os@gmail.com
11
+ License: MIT License
12
+ Keywords: here api,here technologies,here python api clients,rest api clients
13
+ Platform: Any
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
+ Classifier: Programming Language :: Python
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.8
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Requires-Python: >=3.8
26
+ Description-Content-Type: text/x-rst
27
+ License-File: LICENSE
28
+ License-File: COPYING
29
+ License-File: NOTICE
30
+ Requires-Dist: Requests<3,>=2.25.1
31
+
32
+ HerePy
33
+ ======
34
+
35
+ .. image:: https://github.com/abdullahselek/HerePy/workflows/HerePy%20CI/badge.svg
36
+ :target: https://github.com/abdullahselek/HerePy/actions
37
+
38
+ .. image:: https://img.shields.io/pypi/v/herepy.svg
39
+ :target: https://pypi.python.org/pypi/herepy/
40
+
41
+ .. image:: https://img.shields.io/pypi/pyversions/herepy.svg
42
+ :target: https://pypi.org/project/herepy
43
+
44
+ .. image:: https://codecov.io/gh/abdullahselek/HerePy/branch/master/graph/badge.svg
45
+ :target: https://codecov.io/gh/abdullahselek/HerePy
46
+
47
+ .. image:: https://pepy.tech/badge/herepy
48
+ :target: https://pepy.tech/project/herepy
49
+
50
+ .. image:: https://img.shields.io/conda/vn/conda-forge/herepy?logo=conda-forge
51
+ :target: https://anaconda.org/conda-forge/herepy
52
+
53
+ .. image:: https://anaconda.org/conda-forge/herepy/badges/latest_release_date.svg
54
+ :target: https://anaconda.org/conda-forge/herepy
55
+
56
+ .. image:: https://anaconda.org/conda-forge/herepy/badges/license.svg
57
+ :target: https://anaconda.org/conda-forge/herepy
58
+
59
+ Introduction
60
+ ============
61
+
62
+ This library provides a pure Python interface for the `HERE API <https://developer.here.com/>`_. It works with Python versions 3.x.
63
+
64
+ `HERE <https://www.here.com/>`_ provides location based services. HERE exposes a `rest APIs <https://developer.here.com/documentation>`_ and this library is intended to make it even easier for Python programmers to use.
65
+
66
+ Installing
67
+ ==========
68
+
69
+ You can install herepy using Python Package Index::
70
+
71
+ $ pip install herepy
72
+
73
+ Install with conda from the Anaconda conda-forge channel::
74
+
75
+ $ conda install -c conda-forge herepy
76
+
77
+ Install from its source repository on GitHub::
78
+
79
+ $ pip install -e git+https://github.com/abdullahselek/HerePy#egg=herepy
80
+
81
+ Getting the code
82
+ ================
83
+
84
+ The code is hosted at https://github.com/abdullahselek/HerePy
85
+
86
+ Check out the latest development version anonymously with::
87
+
88
+ $ git clone git://github.com/abdullahselek/HerePy.git
89
+ $ cd HerePy
90
+
91
+ To install dependencies, run either::
92
+
93
+ $ pip install -r requirements.testing.txt
94
+ $ pip install -r requirements.txt
95
+
96
+ To install the minimal dependencies for production use (i.e., what is installed
97
+ with ``pip install herepy``) run::
98
+
99
+ $ pip install -r requirements.txt
100
+
101
+ Running Tests
102
+ =============
103
+
104
+ The test suite can be run against a single Python version which requires ``pip install pytest`` and optionally ``pip install pytest-cov`` (these are included if you have installed dependencies from ``requirements.testing.txt``)
105
+
106
+ To run the unit tests with a single Python version::
107
+
108
+ $ py.test -v
109
+
110
+ to also run code coverage::
111
+
112
+ $ py.test --cov=herepy
113
+
114
+ To run the unit tests against a set of Python versions::
115
+
116
+ $ tox
117
+
118
+ Models
119
+ ======
120
+
121
+ The library utilizes models to represent various data structures returned by **herepy**::
122
+
123
+ * herepy.GeocoderResponse
124
+ * herepy.GeocoderReverseResponse
125
+ * herepy.RoutingResponse
126
+ * herepy.RoutingResponseV8
127
+ * herepy.RoutingMatrixResponse
128
+ * herepy.GeocoderAutoCompleteResponse
129
+ * herepy.PlacesResponse
130
+ * herepy.PublicTransitResponse
131
+ * herepy.RmeResponse
132
+ * herepy.TrafficIncidentResponse
133
+ * herepy.DestinationWeatherResponse
134
+ * herepy.EVChargingStationsResponse
135
+ * herepy.WaypointSequenceResponse
136
+ * herepy.TrafficFlowResponse
137
+ * herepy.TrafficFlowAvailabilityResponse
138
+ * herepy.IsolineRoutingResponse
139
+
140
+ API Clients
141
+ ===========
142
+
143
+ Available API clients in **herepy**::
144
+
145
+ * herepy.DestinationWeatherApi
146
+ * herepy.EVChargingStationsApi
147
+ * herepy.FleetTelematicsApi
148
+ * herepy.GeocoderApi
149
+ * herepy.GeocoderAutoCompleteApi
150
+ * herepy.GeocoderReverseApi
151
+ * herepy.PlacesApi
152
+ * herepy.PublicTransitApi
153
+ * herepy.RmeApi
154
+ * herepy.RoutingApi
155
+ * herepy.TrafficApi
156
+ * herepy.IsolineRoutingApi
157
+ * herepy.MapTileApi
158
+ * herepy.VectorTileApi
159
+ * herepy.MapImageApi
160
+
161
+ Documentation
162
+ =============
163
+
164
+ View the latest herepy documentation at `https://herepy.abdullahselek.com/ <https://herepy.abdullahselek.com/>`_. You can view HERE's API documentation at: `https://developer.here.com/documentation <https://developer.here.com/documentation>`_.
165
+
166
+ Using
167
+ =====
168
+
169
+ The library provides a Python wrapper around the HERE APIs with different data models. To get started, check out the examples in the ``examples/`` folder or
170
+ read the documentation at `https://herepy.abdullahselek.com/ <https://herepy.abdullahselek.com/>`_. All API clients need an API key which you can get from `HERE Developer Portal <https://developer.here.com/>`_.
171
+
172
+ License
173
+ -------
174
+
175
+ MIT License
176
+
177
+ Copyright (c) 2017 Abdullah Selek
178
+
179
+ Permission is hereby granted, free of charge, to any person obtaining a copy
180
+ of this software and associated documentation files (the "Software"), to deal
181
+ in the Software without restriction, including without limitation the rights
182
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
183
+ copies of the Software, and to permit persons to whom the Software is
184
+ furnished to do so, subject to the following conditions:
185
+
186
+ The above copyright notice and this permission notice shall be included in all
187
+ copies or substantial portions of the Software.
188
+
189
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
190
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
191
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
192
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
193
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
194
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
195
+ SOFTWARE.
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env python
2
+
3
+ """A library that provides a Python interface to the HERE APIs"""
4
+
5
+ __author__ = "Abdullah Selek"
6
+ __email__ = "abdullahselek.os@gmail.com"
7
+ __copyright__ = "Copyright (c) 2017 Abdullah Selek"
8
+ __license__ = "MIT License"
9
+ __version__ = "3.6.1"
10
+ __url__ = "https://github.com/abdullahselek/HerePy"
11
+ __download_url__ = "https://pypi.org/pypi/herepy"
12
+ __description__ = "A library that provides a Python interface to the HERE APIs"
13
+
14
+
15
+ import json
16
+
17
+ from .destination_weather_api import DestinationWeatherApi
18
+ from .error import (AccessDeniedError, HEREError, InvalidRequestError,
19
+ UnauthorizedError)
20
+ from .ev_charging_stations_api import EVChargingStationsApi
21
+ from .fleet_telematics_api import FleetTelematicsApi
22
+ from .geocoder_api import GeocoderApi
23
+ from .geocoder_autocomplete_api import GeocoderAutoCompleteApi
24
+ from .geocoder_reverse_api import GeocoderReverseApi
25
+ from .here_enum import (AerialMapTileResourceType, AvoidFeature,
26
+ BaseMapTileResourceType, EVStationConnectorTypes,
27
+ FlowProximityAdditionalAttributes,
28
+ IncidentsCriticalityInt, IncidentsCriticalityStr,
29
+ IsolineRoutingMode, IsolineRoutingOptimizationMode,
30
+ IsolineRoutingRangeType, IsolineRoutingTransportMode,
31
+ MapImageFormatType, MapImageResourceType,
32
+ MapTileApiType, MapTileResourceType, MatrixRoutingMode,
33
+ MatrixRoutingProfile, MatrixRoutingTransportMode,
34
+ MatrixRoutingType, MatrixSummaryAttribute,
35
+ MultiplePickupOfferType, PlacesCategory,
36
+ PublicTransitModeType, PublicTransitRoutingMode,
37
+ PublicTransitSearchMethod, RouteMode,
38
+ RoutingApiReturnField, RoutingApiSpanField,
39
+ RoutingMetric, RoutingMode, RoutingTransportMode,
40
+ ShippedHazardousGood, TrafficMapTileResourceType,
41
+ TruckType, TunnelCategory, VectorMapTileLayer,
42
+ WeatherProductType)
43
+ from .isoline_routing_api import IsolineRoutingApi
44
+ from .map_image_api import MapImageApi
45
+ from .map_tile_api import MapTileApi
46
+ from .mercator_projection import MercatorProjection
47
+ from .models import (DestinationWeatherResponse, EVChargingStationsResponse,
48
+ GeocoderAutoCompleteResponse, GeocoderResponse,
49
+ GeocoderReverseResponse, IsolineRoutingResponse,
50
+ PlacesResponse, PublicTransitResponse, RmeResponse,
51
+ RoutingMatrixResponse, RoutingResponse, RoutingResponseV8,
52
+ TrafficFlowAvailabilityResponse, TrafficFlowResponse,
53
+ TrafficIncidentResponse, WaypointSequenceResponse)
54
+ from .objects import Avoid, AvoidArea, AvoidFeature, Truck
55
+ from .places_api import PlacesApi
56
+ from .platform.tour_planning_api import TourPlanningApi
57
+ from .public_transit_api import PublicTransitApi
58
+ from .rme_api import RmeApi
59
+ from .routing_api import (InvalidCredentialsError, InvalidInputDataError,
60
+ LinkIdNotFoundError, NoRouteFoundError,
61
+ RouteNotReconstructedError, RoutingApi,
62
+ WaypointNotFoundError)
63
+ from .traffic_api import TrafficApi
64
+ from .utils import Utils
65
+ from .vector_tile_api import VectorTileApi
@@ -1,15 +1,16 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- import sys
4
3
  import json
4
+ import sys
5
+ from typing import Optional
6
+
5
7
  import requests
6
8
 
9
+ from herepy.error import HEREError, InvalidRequestError, UnauthorizedError
7
10
  from herepy.here_api import HEREApi
8
- from herepy.utils import Utils
9
- from herepy.error import HEREError, UnauthorizedError, InvalidRequestError
10
- from herepy.models import DestinationWeatherResponse
11
11
  from herepy.here_enum import WeatherProductType
12
- from typing import Optional
12
+ from herepy.models import DestinationWeatherResponse
13
+ from herepy.utils import Utils
13
14
 
14
15
 
15
16
  class DestinationWeatherApi(HEREApi):
@@ -19,6 +19,14 @@ class UnauthorizedError(HEREError):
19
19
  """
20
20
 
21
21
 
22
+ class AccessDeniedError(HEREError):
23
+
24
+ """Access Denied Error Type.
25
+
26
+ Indicates the request is not permitted with the credentials provided.
27
+ """
28
+
29
+
22
30
  class InvalidRequestError(HEREError):
23
31
 
24
32
  """Invalid Request Error Type.
@@ -1,14 +1,15 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- import sys
4
3
  import json
4
+ import sys
5
+ from typing import List, Optional
6
+
5
7
  import requests
6
8
 
7
- from typing import List, Optional
8
- from herepy.here_enum import EVStationConnectorTypes
9
- from herepy.utils import Utils
10
9
  from herepy.error import HEREError
10
+ from herepy.here_enum import EVStationConnectorTypes
11
11
  from herepy.models import EVChargingStationsResponse
12
+ from herepy.utils import Utils
12
13
 
13
14
 
14
15
  class EVChargingStationsApi:
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- import sys
4
3
  import json
5
- import requests
6
-
4
+ import sys
7
5
  from typing import List, Optional
8
6
 
7
+ import requests
8
+
9
+ from herepy.error import HEREError
9
10
  from herepy.here_api import HEREApi
10
- from herepy.here_enum import RouteMode, MultiplePickupOfferType
11
- from herepy.utils import Utils
11
+ from herepy.here_enum import MultiplePickupOfferType, RouteMode
12
12
  from herepy.models import WaypointSequenceResponse
13
- from herepy.error import HEREError
13
+ from herepy.utils import Utils
14
14
 
15
15
 
16
16
  class FleetTelematicsApi(HEREApi):
@@ -1,14 +1,15 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- import sys
4
3
  import json
4
+ import sys
5
+ from typing import List, Optional
6
+
5
7
  import requests
6
8
 
7
- from herepy.here_api import HEREApi
8
- from herepy.utils import Utils
9
9
  from herepy.error import HEREError, UnauthorizedError
10
+ from herepy.here_api import HEREApi
10
11
  from herepy.models import GeocoderResponse
11
- from typing import List, Optional
12
+ from herepy.utils import Utils
12
13
 
13
14
 
14
15
  class GeocoderApi(HEREApi):
@@ -1,14 +1,15 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- import sys
4
3
  import json
4
+ import sys
5
+ from typing import List, Optional
6
+
5
7
  import requests
6
8
 
7
- from herepy.here_api import HEREApi
8
- from herepy.utils import Utils
9
9
  from herepy.error import HEREError
10
+ from herepy.here_api import HEREApi
10
11
  from herepy.models import GeocoderAutoCompleteResponse
11
- from typing import List, Optional
12
+ from herepy.utils import Utils
12
13
 
13
14
 
14
15
  class GeocoderAutoCompleteApi(HEREApi):
@@ -1,14 +1,15 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- import sys
4
3
  import json
4
+ import sys
5
+ from typing import List, Optional
6
+
5
7
  import requests
6
8
 
7
- from herepy.here_api import HEREApi
8
- from herepy.utils import Utils
9
9
  from herepy.error import HEREError, UnauthorizedError
10
+ from herepy.here_api import HEREApi
10
11
  from herepy.models import GeocoderReverseResponse
11
- from typing import List, Optional
12
+ from herepy.utils import Utils
12
13
 
13
14
 
14
15
  class GeocoderReverseApi(HEREApi):
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
  class HEREApi(object):
5
- """ Base class from which all wrappers inherit."""
5
+ """Base class from which all wrappers inherit."""
6
6
 
7
7
  def __init__(self, api_key: str = None, timeout: int = None):
8
8
  """Returns a Api instance.
@@ -1,19 +1,17 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- import sys
4
3
  import json
4
+ import sys
5
+ from typing import List, Optional
6
+
5
7
  import requests
6
8
 
7
- from typing import List, Optional
9
+ from herepy.error import HEREError, InvalidRequestError, UnauthorizedError
8
10
  from herepy.here_api import HEREApi
9
- from herepy.utils import Utils
11
+ from herepy.here_enum import (IsolineRoutingMode, IsolineRoutingRangeType,
12
+ IsolineRoutingTransportMode)
10
13
  from herepy.models import IsolineRoutingResponse
11
- from herepy.error import HEREError, UnauthorizedError, InvalidRequestError
12
- from herepy.here_enum import (
13
- IsolineRoutingTransportMode,
14
- IsolineRoutingMode,
15
- IsolineRoutingRangeType,
16
- )
14
+ from herepy.utils import Utils
17
15
 
18
16
 
19
17
  class IsolineRoutingApi(HEREApi):
@@ -1,14 +1,15 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- import sys
4
3
  import json
4
+ import sys
5
+ from typing import List, Optional
6
+
5
7
  import requests
6
8
 
7
- from typing import List, Optional
9
+ from herepy import MapImageFormatType, MapImageResourceType
10
+ from herepy.error import HEREError, InvalidRequestError, UnauthorizedError
8
11
  from herepy.here_api import HEREApi
9
12
  from herepy.utils import Utils
10
- from herepy import MapImageResourceType, MapImageFormatType
11
- from herepy.error import HEREError, InvalidRequestError, UnauthorizedError
12
13
 
13
14
 
14
15
  class MapImageApi(HEREApi):
@@ -1,22 +1,18 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- import sys
4
3
  import json
5
- import requests
6
-
4
+ import sys
7
5
  from random import randrange
8
6
  from typing import Dict, Optional
7
+
8
+ import requests
9
+
10
+ from herepy import BaseMapTileResourceType, MapTileApiType, MapTileResourceType
11
+ from herepy.error import HEREError, InvalidRequestError, UnauthorizedError
9
12
  from herepy.here_api import HEREApi
10
13
  from herepy.utils import Utils
11
- from herepy import (
12
- MercatorProjection,
13
- MapTileApiType,
14
- MapTileResourceType,
15
- BaseMapTileResourceType,
16
- AerialMapTileResourceType,
17
- TrafficMapTileResourceType,
18
- )
19
- from herepy.error import HEREError, InvalidRequestError, UnauthorizedError
14
+
15
+ from .mercator_projection import MercatorProjection
20
16
 
21
17
 
22
18
  class MapTileApi(HEREApi):
@@ -2,7 +2,7 @@ import json
2
2
 
3
3
 
4
4
  class HEREModel(object):
5
- """ Base class from which all here models will inherit."""
5
+ """Base class from which all here models will inherit."""
6
6
 
7
7
  def __init__(self, **kwargs):
8
8
  self.param_defaults = {}
@@ -191,7 +191,7 @@ class TrafficIncidentResponse(HEREModel):
191
191
  "VERSION": None,
192
192
  "TRAFFIC_ITEMS": None,
193
193
  "EXTENDED_COUNTRY_CODE": None,
194
- "error": None
194
+ "error": None,
195
195
  }
196
196
 
197
197
  for (param, default) in self.param_defaults.items():
@@ -1,5 +1,7 @@
1
1
  from typing import List
2
- from herepy import AvoidFeature, ShippedHazardousGood, TunnelCategory, TruckType
2
+
3
+ from herepy.here_enum import (AvoidFeature, ShippedHazardousGood, TruckType,
4
+ TunnelCategory)
3
5
 
4
6
 
5
7
  class AvoidArea(object):
@@ -1,15 +1,16 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- import sys
4
3
  import json
4
+ import sys
5
+ from typing import List, Optional
6
+
5
7
  import requests
6
8
 
7
- from herepy.here_api import HEREApi
8
- from herepy.utils import Utils
9
9
  from herepy.error import HEREError, UnauthorizedError
10
- from herepy.models import PlacesResponse
10
+ from herepy.here_api import HEREApi
11
11
  from herepy.here_enum import PlacesCategory
12
- from typing import List, Optional
12
+ from herepy.models import PlacesResponse
13
+ from herepy.utils import Utils
13
14
 
14
15
 
15
16
  class PlacesApi(HEREApi):
@@ -0,0 +1 @@
1
+ from .tour_planning_api import TourPlanningApi
@@ -0,0 +1,17 @@
1
+ from herepy.here_api import HEREApi
2
+
3
+
4
+ class TourPlanningApi(HEREApi):
5
+ """A python interface into the HERE Tour Planning API"""
6
+
7
+ def __init__(self, api_key: str = None, timeout: int = None):
8
+ """Returns a TourPlanningApi instance.
9
+ Args:
10
+ api_key (str):
11
+ API key taken from HERE Developer Portal.
12
+ timeout (int):
13
+ Timeout limit for requests.
14
+ """
15
+
16
+ super(TourPlanningApi, self).__init__(api_key, timeout)
17
+ self._base_url = "https://tourplanning.hereapi.com/v3/"
@@ -1,19 +1,17 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- import sys
4
3
  import json
4
+ import sys
5
+ from typing import List, Optional
6
+
5
7
  import requests
6
8
 
7
- from herepy.here_api import HEREApi
8
- from herepy.utils import Utils
9
9
  from herepy.error import HEREError, UnauthorizedError
10
+ from herepy.here_api import HEREApi
11
+ from herepy.here_enum import (PublicTransitModeType, PublicTransitRoutingMode,
12
+ PublicTransitSearchMethod)
10
13
  from herepy.models import PublicTransitResponse
11
- from herepy.here_enum import (
12
- PublicTransitSearchMethod,
13
- PublicTransitRoutingMode,
14
- PublicTransitModeType,
15
- )
16
- from typing import List, Optional
14
+ from herepy.utils import Utils
17
15
 
18
16
 
19
17
  class PublicTransitApi(HEREApi):
File without changes
@@ -1,14 +1,15 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- import sys
4
3
  import json
4
+ import sys
5
+ from typing import List, Optional
6
+
5
7
  import requests
6
8
 
7
- from herepy.here_api import HEREApi
8
- from herepy.utils import Utils
9
9
  from herepy.error import HEREError
10
+ from herepy.here_api import HEREApi
10
11
  from herepy.models import RmeResponse
11
- from typing import List, Optional
12
+ from herepy.utils import Utils
12
13
 
13
14
 
14
15
  class RmeApi(HEREApi):