stadiamaps 3.2.1__py3-none-any.whl → 5.0.0__py3-none-any.whl

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 (137) hide show
  1. stadiamaps/__init__.py +32 -11
  2. stadiamaps/api/geocoding_api.py +128 -116
  3. stadiamaps/api/geospatial_api.py +7 -3
  4. stadiamaps/api/routing_api.py +33 -19
  5. stadiamaps/api_client.py +21 -5
  6. stadiamaps/configuration.py +156 -40
  7. stadiamaps/exceptions.py +1 -1
  8. stadiamaps/models/__init__.py +31 -10
  9. stadiamaps/models/access.py +1 -1
  10. stadiamaps/models/admin_region.py +1 -1
  11. stadiamaps/models/administrative.py +1 -1
  12. stadiamaps/models/annotation_filters.py +124 -0
  13. stadiamaps/models/auto_costing_options.py +1 -1
  14. stadiamaps/models/base_costing_options.py +1 -1
  15. stadiamaps/models/base_trace_request.py +7 -7
  16. stadiamaps/models/bicycle_costing_options.py +1 -1
  17. stadiamaps/models/bike_network.py +1 -1
  18. stadiamaps/models/bulk_request.py +1 -1
  19. stadiamaps/models/bulk_request_query.py +1 -1
  20. stadiamaps/models/bulk_search_response.py +4 -4
  21. stadiamaps/models/contour.py +1 -1
  22. stadiamaps/models/coordinate.py +1 -1
  23. stadiamaps/models/costing_model.py +1 -1
  24. stadiamaps/models/costing_options.py +1 -1
  25. stadiamaps/models/directions_options.py +4 -4
  26. stadiamaps/models/distance_unit.py +1 -1
  27. stadiamaps/models/edge_sign.py +1 -1
  28. stadiamaps/models/edge_use.py +1 -1
  29. stadiamaps/models/end_node.py +4 -4
  30. stadiamaps/models/extended_directions_options.py +121 -0
  31. stadiamaps/models/geo_attributes.py +1 -1
  32. stadiamaps/models/geo_json_geometry.py +1 -1
  33. stadiamaps/models/geo_json_geometry_base.py +1 -1
  34. stadiamaps/models/geo_json_line_string.py +1 -1
  35. stadiamaps/models/geo_json_point.py +1 -1
  36. stadiamaps/models/geo_json_polygon.py +1 -1
  37. stadiamaps/models/{pelias_response.py → geocode_response.py} +11 -11
  38. stadiamaps/models/{pelias_geo_json_feature.py → geocoding_geo_json_feature.py} +8 -8
  39. stadiamaps/models/{pelias_geo_json_properties.py → geocoding_geo_json_properties.py} +40 -14
  40. stadiamaps/models/{pelias_geo_json_properties_addendum.py → geocoding_geo_json_properties_addendum.py} +7 -7
  41. stadiamaps/models/{pelias_geo_json_properties_addendum_osm.py → geocoding_geo_json_properties_addendum_osm.py} +5 -5
  42. stadiamaps/models/{pelias_layer.py → geocoding_layer.py} +3 -3
  43. stadiamaps/models/geocoding_object.py +1 -1
  44. stadiamaps/models/{pelias_source.py → geocoding_source.py} +4 -3
  45. stadiamaps/models/height_request.py +4 -4
  46. stadiamaps/models/height_response.py +4 -4
  47. stadiamaps/models/highway_classification.py +1 -1
  48. stadiamaps/models/intersecting_edge.py +1 -1
  49. stadiamaps/models/isochrone_costing_model.py +1 -1
  50. stadiamaps/models/isochrone_feature.py +1 -1
  51. stadiamaps/models/isochrone_properties.py +1 -1
  52. stadiamaps/models/isochrone_request.py +7 -7
  53. stadiamaps/models/isochrone_response.py +4 -4
  54. stadiamaps/models/locate_detailed_edge.py +1 -1
  55. stadiamaps/models/locate_edge.py +1 -1
  56. stadiamaps/models/locate_edge_info.py +1 -1
  57. stadiamaps/models/locate_node.py +1 -1
  58. stadiamaps/models/locate_object.py +7 -7
  59. stadiamaps/models/low_speed_vehicle_costing_options.py +1 -1
  60. stadiamaps/models/maneuver_sign.py +13 -13
  61. stadiamaps/models/maneuver_sign_element.py +1 -1
  62. stadiamaps/models/map_match_costing_model.py +1 -1
  63. stadiamaps/models/map_match_request.py +35 -11
  64. stadiamaps/models/map_match_route_response.py +4 -4
  65. stadiamaps/models/map_match_trace_options.py +1 -1
  66. stadiamaps/models/map_match_waypoint.py +1 -1
  67. stadiamaps/models/matched_point.py +1 -1
  68. stadiamaps/models/matrix_costing_model.py +1 -1
  69. stadiamaps/models/matrix_distance.py +1 -1
  70. stadiamaps/models/matrix_request.py +10 -10
  71. stadiamaps/models/matrix_response.py +16 -16
  72. stadiamaps/models/matrix_waypoint.py +1 -1
  73. stadiamaps/models/motor_scooter_costing_options.py +1 -1
  74. stadiamaps/models/motorcycle_costing_options.py +1 -1
  75. stadiamaps/models/nearest_roads_request.py +7 -7
  76. stadiamaps/models/node_id.py +1 -1
  77. stadiamaps/models/node_type.py +1 -1
  78. stadiamaps/models/optimized_route_request.py +35 -11
  79. stadiamaps/models/osrm_admin.py +103 -0
  80. stadiamaps/models/osrm_annotation.py +117 -0
  81. stadiamaps/models/osrm_banner_component.py +113 -0
  82. stadiamaps/models/osrm_banner_content.py +131 -0
  83. stadiamaps/models/osrm_banner_instruction.py +112 -0
  84. stadiamaps/models/osrm_base_api_response.py +112 -0
  85. stadiamaps/models/osrm_guidance_modifier.py +44 -0
  86. stadiamaps/models/osrm_intersection.py +145 -0
  87. stadiamaps/models/osrm_lane.py +111 -0
  88. stadiamaps/models/osrm_route.py +119 -0
  89. stadiamaps/models/osrm_route_leg.py +148 -0
  90. stadiamaps/models/osrm_route_response.py +132 -0
  91. stadiamaps/models/osrm_route_step.py +185 -0
  92. stadiamaps/models/osrm_speed_limit.py +117 -0
  93. stadiamaps/models/osrm_step_maneuver.py +127 -0
  94. stadiamaps/models/osrm_via_waypoint.py +105 -0
  95. stadiamaps/models/osrm_voice_instruction.py +105 -0
  96. stadiamaps/models/osrm_waypoint.py +108 -0
  97. stadiamaps/models/pedestrian_costing_options.py +1 -1
  98. stadiamaps/models/restrictions.py +1 -1
  99. stadiamaps/models/road_class.py +1 -1
  100. stadiamaps/models/route200_response.py +138 -0
  101. stadiamaps/models/route_leg.py +4 -4
  102. stadiamaps/models/route_maneuver.py +1 -1
  103. stadiamaps/models/route_request.py +34 -12
  104. stadiamaps/models/route_response.py +4 -4
  105. stadiamaps/models/route_response_alternates_inner.py +1 -1
  106. stadiamaps/models/route_summary.py +1 -1
  107. stadiamaps/models/route_trip.py +13 -13
  108. stadiamaps/models/{valhalla_languages.py → routing_languages.py} +4 -4
  109. stadiamaps/models/{valhalla_long_units.py → routing_long_units.py} +4 -4
  110. stadiamaps/models/routing_response_waypoint.py +1 -1
  111. stadiamaps/models/routing_waypoint.py +1 -1
  112. stadiamaps/models/routing_waypoint_all_of_search_filter.py +1 -1
  113. stadiamaps/models/search_query.py +6 -6
  114. stadiamaps/models/search_structured_query.py +6 -6
  115. stadiamaps/models/simple_routing_waypoint.py +1 -1
  116. stadiamaps/models/speeds.py +1 -1
  117. stadiamaps/models/trace_attribute_filter_options.py +1 -1
  118. stadiamaps/models/trace_attribute_key.py +1 -1
  119. stadiamaps/models/trace_attributes_base_response.py +10 -10
  120. stadiamaps/models/trace_attributes_request.py +13 -11
  121. stadiamaps/models/trace_attributes_response.py +16 -16
  122. stadiamaps/models/trace_edge.py +2 -2
  123. stadiamaps/models/travel_mode.py +1 -1
  124. stadiamaps/models/traversability.py +1 -1
  125. stadiamaps/models/truck_costing_options.py +1 -1
  126. stadiamaps/models/tz_response.py +1 -1
  127. stadiamaps/models/warning.py +1 -1
  128. stadiamaps/rest.py +2 -2
  129. {stadiamaps-3.2.1.dist-info → stadiamaps-5.0.0.dist-info}/METADATA +14 -6
  130. stadiamaps-5.0.0.dist-info/RECORD +157 -0
  131. {stadiamaps-3.2.1.dist-info → stadiamaps-5.0.0.dist-info}/WHEEL +1 -1
  132. stadiamaps/models/pelias_response_geocoding.py +0 -89
  133. stadiamaps/models/route_response_trip.py +0 -117
  134. stadiamaps/models/trace_attributes_response_all_of.py +0 -96
  135. stadiamaps-3.2.1.dist-info/RECORD +0 -139
  136. {stadiamaps-3.2.1.dist-info → stadiamaps-5.0.0.dist-info}/LICENSE.txt +0 -0
  137. {stadiamaps-3.2.1.dist-info → stadiamaps-5.0.0.dist-info}/top_level.txt +0 -0
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 6.6.3
8
+ The version of the OpenAPI document: 8.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -260,7 +260,9 @@ class GeospatialApi:
260
260
  _query_params: List[Tuple[str, str]] = []
261
261
  _header_params: Dict[str, Optional[str]] = _headers or {}
262
262
  _form_params: List[Tuple[str, str]] = []
263
- _files: Dict[str, Union[str, bytes]] = {}
263
+ _files: Dict[
264
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
265
+ ] = {}
264
266
  _body_params: Optional[bytes] = None
265
267
 
266
268
  # process the path parameters
@@ -561,7 +563,9 @@ class GeospatialApi:
561
563
  _query_params: List[Tuple[str, str]] = []
562
564
  _header_params: Dict[str, Optional[str]] = _headers or {}
563
565
  _form_params: List[Tuple[str, str]] = []
564
- _files: Dict[str, Union[str, bytes]] = {}
566
+ _files: Dict[
567
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
568
+ ] = {}
565
569
  _body_params: Optional[bytes] = None
566
570
 
567
571
  # process the path parameters
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 6.6.3
8
+ The version of the OpenAPI document: 8.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -27,8 +27,8 @@ from stadiamaps.models.matrix_request import MatrixRequest
27
27
  from stadiamaps.models.matrix_response import MatrixResponse
28
28
  from stadiamaps.models.nearest_roads_request import NearestRoadsRequest
29
29
  from stadiamaps.models.optimized_route_request import OptimizedRouteRequest
30
+ from stadiamaps.models.route200_response import Route200Response
30
31
  from stadiamaps.models.route_request import RouteRequest
31
- from stadiamaps.models.route_response import RouteResponse
32
32
  from stadiamaps.models.trace_attributes_request import TraceAttributesRequest
33
33
  from stadiamaps.models.trace_attributes_response import TraceAttributesResponse
34
34
 
@@ -268,7 +268,9 @@ class RoutingApi:
268
268
  _query_params: List[Tuple[str, str]] = []
269
269
  _header_params: Dict[str, Optional[str]] = _headers or {}
270
270
  _form_params: List[Tuple[str, str]] = []
271
- _files: Dict[str, Union[str, bytes]] = {}
271
+ _files: Dict[
272
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
273
+ ] = {}
272
274
  _body_params: Optional[bytes] = None
273
275
 
274
276
  # process the path parameters
@@ -546,7 +548,9 @@ class RoutingApi:
546
548
  _query_params: List[Tuple[str, str]] = []
547
549
  _header_params: Dict[str, Optional[str]] = _headers or {}
548
550
  _form_params: List[Tuple[str, str]] = []
549
- _files: Dict[str, Union[str, bytes]] = {}
551
+ _files: Dict[
552
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
553
+ ] = {}
550
554
  _body_params: Optional[bytes] = None
551
555
 
552
556
  # process the path parameters
@@ -821,7 +825,9 @@ class RoutingApi:
821
825
  _query_params: List[Tuple[str, str]] = []
822
826
  _header_params: Dict[str, Optional[str]] = _headers or {}
823
827
  _form_params: List[Tuple[str, str]] = []
824
- _files: Dict[str, Union[str, bytes]] = {}
828
+ _files: Dict[
829
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
830
+ ] = {}
825
831
  _body_params: Optional[bytes] = None
826
832
 
827
833
  # process the path parameters
@@ -894,7 +900,7 @@ class RoutingApi:
894
900
  _content_type: Optional[StrictStr] = None,
895
901
  _headers: Optional[Dict[StrictStr, Any]] = None,
896
902
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
897
- ) -> RouteResponse:
903
+ ) -> Route200Response:
898
904
  """Calculate an optimized route between a known start and end point.
899
905
 
900
906
  The optimized route API is a mix of the matrix and normal route API. For an optimized route, the start and end point are fixed, but the intermediate points will be re-ordered to form an optimal route visiting all nodes once.
@@ -932,7 +938,7 @@ class RoutingApi:
932
938
  )
933
939
 
934
940
  _response_types_map: Dict[str, Optional[str]] = {
935
- '200': "RouteResponse",
941
+ '200': "Route200Response",
936
942
  '400': None,
937
943
  '500': None,
938
944
  }
@@ -963,7 +969,7 @@ class RoutingApi:
963
969
  _content_type: Optional[StrictStr] = None,
964
970
  _headers: Optional[Dict[StrictStr, Any]] = None,
965
971
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
966
- ) -> ApiResponse[RouteResponse]:
972
+ ) -> ApiResponse[Route200Response]:
967
973
  """Calculate an optimized route between a known start and end point.
968
974
 
969
975
  The optimized route API is a mix of the matrix and normal route API. For an optimized route, the start and end point are fixed, but the intermediate points will be re-ordered to form an optimal route visiting all nodes once.
@@ -1001,7 +1007,7 @@ class RoutingApi:
1001
1007
  )
1002
1008
 
1003
1009
  _response_types_map: Dict[str, Optional[str]] = {
1004
- '200': "RouteResponse",
1010
+ '200': "Route200Response",
1005
1011
  '400': None,
1006
1012
  '500': None,
1007
1013
  }
@@ -1070,7 +1076,7 @@ class RoutingApi:
1070
1076
  )
1071
1077
 
1072
1078
  _response_types_map: Dict[str, Optional[str]] = {
1073
- '200': "RouteResponse",
1079
+ '200': "Route200Response",
1074
1080
  '400': None,
1075
1081
  '500': None,
1076
1082
  }
@@ -1099,7 +1105,9 @@ class RoutingApi:
1099
1105
  _query_params: List[Tuple[str, str]] = []
1100
1106
  _header_params: Dict[str, Optional[str]] = _headers or {}
1101
1107
  _form_params: List[Tuple[str, str]] = []
1102
- _files: Dict[str, Union[str, bytes]] = {}
1108
+ _files: Dict[
1109
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1110
+ ] = {}
1103
1111
  _body_params: Optional[bytes] = None
1104
1112
 
1105
1113
  # process the path parameters
@@ -1172,7 +1180,7 @@ class RoutingApi:
1172
1180
  _content_type: Optional[StrictStr] = None,
1173
1181
  _headers: Optional[Dict[StrictStr, Any]] = None,
1174
1182
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1175
- ) -> RouteResponse:
1183
+ ) -> Route200Response:
1176
1184
  """Get turn by turn routing instructions between two or more locations.
1177
1185
 
1178
1186
  The route (turn-by-turn) API computes routes between two or more locations. It supports a variety of tunable costing methods, and supports routing through intermediate waypoints and discontinuous multi-leg routes.
@@ -1210,7 +1218,7 @@ class RoutingApi:
1210
1218
  )
1211
1219
 
1212
1220
  _response_types_map: Dict[str, Optional[str]] = {
1213
- '200': "RouteResponse",
1221
+ '200': "Route200Response",
1214
1222
  '400': None,
1215
1223
  '500': None,
1216
1224
  }
@@ -1241,7 +1249,7 @@ class RoutingApi:
1241
1249
  _content_type: Optional[StrictStr] = None,
1242
1250
  _headers: Optional[Dict[StrictStr, Any]] = None,
1243
1251
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1244
- ) -> ApiResponse[RouteResponse]:
1252
+ ) -> ApiResponse[Route200Response]:
1245
1253
  """Get turn by turn routing instructions between two or more locations.
1246
1254
 
1247
1255
  The route (turn-by-turn) API computes routes between two or more locations. It supports a variety of tunable costing methods, and supports routing through intermediate waypoints and discontinuous multi-leg routes.
@@ -1279,7 +1287,7 @@ class RoutingApi:
1279
1287
  )
1280
1288
 
1281
1289
  _response_types_map: Dict[str, Optional[str]] = {
1282
- '200': "RouteResponse",
1290
+ '200': "Route200Response",
1283
1291
  '400': None,
1284
1292
  '500': None,
1285
1293
  }
@@ -1348,7 +1356,7 @@ class RoutingApi:
1348
1356
  )
1349
1357
 
1350
1358
  _response_types_map: Dict[str, Optional[str]] = {
1351
- '200': "RouteResponse",
1359
+ '200': "Route200Response",
1352
1360
  '400': None,
1353
1361
  '500': None,
1354
1362
  }
@@ -1377,7 +1385,9 @@ class RoutingApi:
1377
1385
  _query_params: List[Tuple[str, str]] = []
1378
1386
  _header_params: Dict[str, Optional[str]] = _headers or {}
1379
1387
  _form_params: List[Tuple[str, str]] = []
1380
- _files: Dict[str, Union[str, bytes]] = {}
1388
+ _files: Dict[
1389
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1390
+ ] = {}
1381
1391
  _body_params: Optional[bytes] = None
1382
1392
 
1383
1393
  # process the path parameters
@@ -1652,7 +1662,9 @@ class RoutingApi:
1652
1662
  _query_params: List[Tuple[str, str]] = []
1653
1663
  _header_params: Dict[str, Optional[str]] = _headers or {}
1654
1664
  _form_params: List[Tuple[str, str]] = []
1655
- _files: Dict[str, Union[str, bytes]] = {}
1665
+ _files: Dict[
1666
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1667
+ ] = {}
1656
1668
  _body_params: Optional[bytes] = None
1657
1669
 
1658
1670
  # process the path parameters
@@ -1927,7 +1939,9 @@ class RoutingApi:
1927
1939
  _query_params: List[Tuple[str, str]] = []
1928
1940
  _header_params: Dict[str, Optional[str]] = _headers or {}
1929
1941
  _form_params: List[Tuple[str, str]] = []
1930
- _files: Dict[str, Union[str, bytes]] = {}
1942
+ _files: Dict[
1943
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1944
+ ] = {}
1931
1945
  _body_params: Optional[bytes] = None
1932
1946
 
1933
1947
  # process the path parameters
stadiamaps/api_client.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 6.6.3
8
+ The version of the OpenAPI document: 8.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -16,6 +16,7 @@
16
16
  import datetime
17
17
  from dateutil.parser import parse
18
18
  from enum import Enum
19
+ import decimal
19
20
  import json
20
21
  import mimetypes
21
22
  import os
@@ -67,6 +68,7 @@ class ApiClient:
67
68
  'bool': bool,
68
69
  'date': datetime.date,
69
70
  'datetime': datetime.datetime,
71
+ 'decimal': decimal.Decimal,
70
72
  'object': object,
71
73
  }
72
74
  _pool = None
@@ -89,7 +91,7 @@ class ApiClient:
89
91
  self.default_headers[header_name] = header_value
90
92
  self.cookie = cookie
91
93
  # Set default User-Agent.
92
- self.user_agent = 'OpenAPI-Generator/3.2.1/python'
94
+ self.user_agent = 'OpenAPI-Generator/5.0.0/python'
93
95
  self.client_side_validation = configuration.client_side_validation
94
96
 
95
97
  def __enter__(self):
@@ -339,6 +341,7 @@ class ApiClient:
339
341
  If obj is str, int, long, float, bool, return directly.
340
342
  If obj is datetime.datetime, datetime.date
341
343
  convert to string in iso8601 format.
344
+ If obj is decimal.Decimal return string representation.
342
345
  If obj is list, sanitize each element in the list.
343
346
  If obj is dict, return the dict.
344
347
  If obj is OpenAPI model, return the properties dict.
@@ -364,6 +367,8 @@ class ApiClient:
364
367
  )
365
368
  elif isinstance(obj, (datetime.datetime, datetime.date)):
366
369
  return obj.isoformat()
370
+ elif isinstance(obj, decimal.Decimal):
371
+ return str(obj)
367
372
 
368
373
  elif isinstance(obj, dict):
369
374
  obj_dict = obj
@@ -400,12 +405,12 @@ class ApiClient:
400
405
  data = json.loads(response_text)
401
406
  except ValueError:
402
407
  data = response_text
403
- elif content_type.startswith("application/json"):
408
+ elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE):
404
409
  if response_text == "":
405
410
  data = ""
406
411
  else:
407
412
  data = json.loads(response_text)
408
- elif content_type.startswith("text/plain"):
413
+ elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE):
409
414
  data = response_text
410
415
  else:
411
416
  raise ApiException(
@@ -455,6 +460,8 @@ class ApiClient:
455
460
  return self.__deserialize_date(data)
456
461
  elif klass == datetime.datetime:
457
462
  return self.__deserialize_datetime(data)
463
+ elif klass == decimal.Decimal:
464
+ return decimal.Decimal(data)
458
465
  elif issubclass(klass, Enum):
459
466
  return self.__deserialize_enum(data, klass)
460
467
  else:
@@ -529,7 +536,10 @@ class ApiClient:
529
536
 
530
537
  return "&".join(["=".join(map(str, item)) for item in new_params])
531
538
 
532
- def files_parameters(self, files: Dict[str, Union[str, bytes]]):
539
+ def files_parameters(
540
+ self,
541
+ files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]],
542
+ ):
533
543
  """Builds form parameters.
534
544
 
535
545
  :param files: File parameters.
@@ -544,6 +554,12 @@ class ApiClient:
544
554
  elif isinstance(v, bytes):
545
555
  filename = k
546
556
  filedata = v
557
+ elif isinstance(v, tuple):
558
+ filename, filedata = v
559
+ elif isinstance(v, list):
560
+ for file_param in v:
561
+ params.extend(self.files_parameters({k: file_param}))
562
+ continue
547
563
  else:
548
564
  raise ValueError("Unsupported file value")
549
565
  mimetype = (
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 6.6.3
8
+ The version of the OpenAPI document: 8.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -14,14 +14,16 @@
14
14
 
15
15
 
16
16
  import copy
17
+ import http.client as httplib
17
18
  import logging
18
19
  from logging import FileHandler
19
20
  import multiprocessing
20
21
  import sys
21
- from typing import Optional
22
+ from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict
23
+ from typing_extensions import NotRequired, Self
24
+
22
25
  import urllib3
23
26
 
24
- import http.client as httplib
25
27
 
26
28
  JSON_SCHEMA_VALIDATION_KEYWORDS = {
27
29
  'multipleOf', 'maximum', 'exclusiveMaximum',
@@ -29,6 +31,107 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = {
29
31
  'minLength', 'pattern', 'maxItems', 'minItems'
30
32
  }
31
33
 
34
+ ServerVariablesT = Dict[str, str]
35
+
36
+ GenericAuthSetting = TypedDict(
37
+ "GenericAuthSetting",
38
+ {
39
+ "type": str,
40
+ "in": str,
41
+ "key": str,
42
+ "value": str,
43
+ },
44
+ )
45
+
46
+
47
+ OAuth2AuthSetting = TypedDict(
48
+ "OAuth2AuthSetting",
49
+ {
50
+ "type": Literal["oauth2"],
51
+ "in": Literal["header"],
52
+ "key": Literal["Authorization"],
53
+ "value": str,
54
+ },
55
+ )
56
+
57
+
58
+ APIKeyAuthSetting = TypedDict(
59
+ "APIKeyAuthSetting",
60
+ {
61
+ "type": Literal["api_key"],
62
+ "in": str,
63
+ "key": str,
64
+ "value": Optional[str],
65
+ },
66
+ )
67
+
68
+
69
+ BasicAuthSetting = TypedDict(
70
+ "BasicAuthSetting",
71
+ {
72
+ "type": Literal["basic"],
73
+ "in": Literal["header"],
74
+ "key": Literal["Authorization"],
75
+ "value": Optional[str],
76
+ },
77
+ )
78
+
79
+
80
+ BearerFormatAuthSetting = TypedDict(
81
+ "BearerFormatAuthSetting",
82
+ {
83
+ "type": Literal["bearer"],
84
+ "in": Literal["header"],
85
+ "format": Literal["JWT"],
86
+ "key": Literal["Authorization"],
87
+ "value": str,
88
+ },
89
+ )
90
+
91
+
92
+ BearerAuthSetting = TypedDict(
93
+ "BearerAuthSetting",
94
+ {
95
+ "type": Literal["bearer"],
96
+ "in": Literal["header"],
97
+ "key": Literal["Authorization"],
98
+ "value": str,
99
+ },
100
+ )
101
+
102
+
103
+ HTTPSignatureAuthSetting = TypedDict(
104
+ "HTTPSignatureAuthSetting",
105
+ {
106
+ "type": Literal["http-signature"],
107
+ "in": Literal["header"],
108
+ "key": Literal["Authorization"],
109
+ "value": None,
110
+ },
111
+ )
112
+
113
+
114
+ AuthSettings = TypedDict(
115
+ "AuthSettings",
116
+ {
117
+ "ApiKeyAuth": APIKeyAuthSetting,
118
+ },
119
+ total=False,
120
+ )
121
+
122
+
123
+ class HostSettingVariable(TypedDict):
124
+ description: str
125
+ default_value: str
126
+ enum_values: List[str]
127
+
128
+
129
+ class HostSetting(TypedDict):
130
+ url: str
131
+ description: str
132
+ variables: NotRequired[Dict[str, HostSettingVariable]]
133
+
134
+
32
135
  class Configuration:
33
136
  """This class contains various settings of the API client.
34
137
 
@@ -82,20 +185,26 @@ conf = stadiamaps.Configuration(
82
185
  Cookie: JSESSIONID abc123
83
186
  """
84
187
 
85
- _default = None
86
-
87
- def __init__(self, host=None,
88
- api_key=None, api_key_prefix=None,
89
- username=None, password=None,
90
- access_token=None,
91
- server_index=None, server_variables=None,
92
- server_operation_index=None, server_operation_variables=None,
93
- ignore_operation_servers=False,
94
- ssl_ca_cert=None,
95
- retries=None,
96
- *,
97
- debug: Optional[bool] = None
98
- ) -> None:
188
+ _default: ClassVar[Optional[Self]] = None
189
+
190
+ def __init__(
191
+ self,
192
+ host: Optional[str]=None,
193
+ api_key: Optional[Dict[str, str]]=None,
194
+ api_key_prefix: Optional[Dict[str, str]]=None,
195
+ username: Optional[str]=None,
196
+ password: Optional[str]=None,
197
+ access_token: Optional[str]=None,
198
+ server_index: Optional[int]=None,
199
+ server_variables: Optional[ServerVariablesT]=None,
200
+ server_operation_index: Optional[Dict[int, int]]=None,
201
+ server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
202
+ ignore_operation_servers: bool=False,
203
+ ssl_ca_cert: Optional[str]=None,
204
+ retries: Optional[int] = None,
205
+ *,
206
+ debug: Optional[bool] = None,
207
+ ) -> None:
99
208
  """Constructor
100
209
  """
101
210
  self._base_path = "https://api.stadiamaps.com" if host is None else host
@@ -219,7 +328,7 @@ conf = stadiamaps.Configuration(
219
328
  """date format
220
329
  """
221
330
 
222
- def __deepcopy__(self, memo):
331
+ def __deepcopy__(self, memo: Dict[int, Any]) -> Self:
223
332
  cls = self.__class__
224
333
  result = cls.__new__(cls)
225
334
  memo[id(self)] = result
@@ -233,11 +342,11 @@ conf = stadiamaps.Configuration(
233
342
  result.debug = self.debug
234
343
  return result
235
344
 
236
- def __setattr__(self, name, value):
345
+ def __setattr__(self, name: str, value: Any) -> None:
237
346
  object.__setattr__(self, name, value)
238
347
 
239
348
  @classmethod
240
- def set_default(cls, default):
349
+ def set_default(cls, default: Optional[Self]) -> None:
241
350
  """Set default instance of configuration.
242
351
 
243
352
  It stores default configuration, which can be
@@ -248,7 +357,7 @@ conf = stadiamaps.Configuration(
248
357
  cls._default = default
249
358
 
250
359
  @classmethod
251
- def get_default_copy(cls):
360
+ def get_default_copy(cls) -> Self:
252
361
  """Deprecated. Please use `get_default` instead.
253
362
 
254
363
  Deprecated. Please use `get_default` instead.
@@ -258,7 +367,7 @@ conf = stadiamaps.Configuration(
258
367
  return cls.get_default()
259
368
 
260
369
  @classmethod
261
- def get_default(cls):
370
+ def get_default(cls) -> Self:
262
371
  """Return the default configuration.
263
372
 
264
373
  This method returns newly created, based on default constructor,
@@ -268,11 +377,11 @@ conf = stadiamaps.Configuration(
268
377
  :return: The configuration object.
269
378
  """
270
379
  if cls._default is None:
271
- cls._default = Configuration()
380
+ cls._default = cls()
272
381
  return cls._default
273
382
 
274
383
  @property
275
- def logger_file(self):
384
+ def logger_file(self) -> Optional[str]:
276
385
  """The logger file.
277
386
 
278
387
  If the logger_file is None, then add stream handler and remove file
@@ -284,7 +393,7 @@ conf = stadiamaps.Configuration(
284
393
  return self.__logger_file
285
394
 
286
395
  @logger_file.setter
287
- def logger_file(self, value):
396
+ def logger_file(self, value: Optional[str]) -> None:
288
397
  """The logger file.
289
398
 
290
399
  If the logger_file is None, then add stream handler and remove file
@@ -303,7 +412,7 @@ conf = stadiamaps.Configuration(
303
412
  logger.addHandler(self.logger_file_handler)
304
413
 
305
414
  @property
306
- def debug(self):
415
+ def debug(self) -> bool:
307
416
  """Debug status
308
417
 
309
418
  :param value: The debug status, True or False.
@@ -312,7 +421,7 @@ conf = stadiamaps.Configuration(
312
421
  return self.__debug
313
422
 
314
423
  @debug.setter
315
- def debug(self, value):
424
+ def debug(self, value: bool) -> None:
316
425
  """Debug status
317
426
 
318
427
  :param value: The debug status, True or False.
@@ -334,7 +443,7 @@ conf = stadiamaps.Configuration(
334
443
  httplib.HTTPConnection.debuglevel = 0
335
444
 
336
445
  @property
337
- def logger_format(self):
446
+ def logger_format(self) -> str:
338
447
  """The logger format.
339
448
 
340
449
  The logger_formatter will be updated when sets logger_format.
@@ -345,7 +454,7 @@ conf = stadiamaps.Configuration(
345
454
  return self.__logger_format
346
455
 
347
456
  @logger_format.setter
348
- def logger_format(self, value):
457
+ def logger_format(self, value: str) -> None:
349
458
  """The logger format.
350
459
 
351
460
  The logger_formatter will be updated when sets logger_format.
@@ -356,7 +465,7 @@ conf = stadiamaps.Configuration(
356
465
  self.__logger_format = value
357
466
  self.logger_formatter = logging.Formatter(self.__logger_format)
358
467
 
359
- def get_api_key_with_prefix(self, identifier, alias=None):
468
+ def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]:
360
469
  """Gets API key (with prefix if set).
361
470
 
362
471
  :param identifier: The identifier of apiKey.
@@ -373,7 +482,9 @@ conf = stadiamaps.Configuration(
373
482
  else:
374
483
  return key
375
484
 
376
- def get_basic_auth_token(self):
485
+ return None
486
+
487
+ def get_basic_auth_token(self) -> Optional[str]:
377
488
  """Gets HTTP basic authentication header (string).
378
489
 
379
490
  :return: The token for basic HTTP authentication.
@@ -388,12 +499,12 @@ conf = stadiamaps.Configuration(
388
499
  basic_auth=username + ':' + password
389
500
  ).get('authorization')
390
501
 
391
- def auth_settings(self):
502
+ def auth_settings(self)-> AuthSettings:
392
503
  """Gets Auth Settings dict for api client.
393
504
 
394
505
  :return: The Auth Settings information dict.
395
506
  """
396
- auth = {}
507
+ auth: AuthSettings = {}
397
508
  if 'ApiKeyAuth' in self.api_key:
398
509
  auth['ApiKeyAuth'] = {
399
510
  'type': 'api_key',
@@ -405,7 +516,7 @@ conf = stadiamaps.Configuration(
405
516
  }
406
517
  return auth
407
518
 
408
- def to_debug_report(self):
519
+ def to_debug_report(self) -> str:
409
520
  """Gets the essential information for debugging.
410
521
 
411
522
  :return: The report for debugging.
@@ -413,11 +524,11 @@ conf = stadiamaps.Configuration(
413
524
  return "Python SDK Debug Report:\n"\
414
525
  "OS: {env}\n"\
415
526
  "Python Version: {pyversion}\n"\
416
- "Version of the API: 6.6.3\n"\
417
- "SDK Package Version: 3.2.1".\
527
+ "Version of the API: 8.0.0\n"\
528
+ "SDK Package Version: 5.0.0".\
418
529
  format(env=sys.platform, pyversion=sys.version)
419
530
 
420
- def get_host_settings(self):
531
+ def get_host_settings(self) -> List[HostSetting]:
421
532
  """Gets an array of host settings
422
533
 
423
534
  :return: An array of host settings
@@ -433,7 +544,12 @@ conf = stadiamaps.Configuration(
433
544
  }
434
545
  ]
435
546
 
436
- def get_host_from_settings(self, index, variables=None, servers=None):
547
+ def get_host_from_settings(
548
+ self,
549
+ index: Optional[int],
550
+ variables: Optional[ServerVariablesT]=None,
551
+ servers: Optional[List[HostSetting]]=None,
552
+ ) -> str:
437
553
  """Gets host URL based on the index and variables
438
554
  :param index: array index of the host settings
439
555
  :param variables: hash of variable and the corresponding value
@@ -473,12 +589,12 @@ conf = stadiamaps.Configuration(
473
589
  return url
474
590
 
475
591
  @property
476
- def host(self):
592
+ def host(self) -> str:
477
593
  """Return generated host."""
478
594
  return self.get_host_from_settings(self.server_index, variables=self.server_variables)
479
595
 
480
596
  @host.setter
481
- def host(self, value):
597
+ def host(self, value: str) -> None:
482
598
  """Fix base path."""
483
599
  self._base_path = value
484
600
  self.server_index = None
stadiamaps/exceptions.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 6.6.3
8
+ The version of the OpenAPI document: 8.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11