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
 
@@ -19,9 +19,9 @@ from enum import Enum
19
19
  from typing_extensions import Self
20
20
 
21
21
 
22
- class ValhallaLanguages(str, Enum):
22
+ class RoutingLanguages(str, Enum):
23
23
  """
24
- ValhallaLanguages
24
+ RoutingLanguages
25
25
  """
26
26
 
27
27
  """
@@ -59,7 +59,7 @@ class ValhallaLanguages(str, Enum):
59
59
 
60
60
  @classmethod
61
61
  def from_json(cls, json_str: str) -> Self:
62
- """Create an instance of ValhallaLanguages from a JSON string"""
62
+ """Create an instance of RoutingLanguages from a JSON string"""
63
63
  return cls(json.loads(json_str))
64
64
 
65
65
 
@@ -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
 
@@ -19,9 +19,9 @@ from enum import Enum
19
19
  from typing_extensions import Self
20
20
 
21
21
 
22
- class ValhallaLongUnits(str, Enum):
22
+ class RoutingLongUnits(str, Enum):
23
23
  """
24
- ValhallaLongUnits
24
+ RoutingLongUnits
25
25
  """
26
26
 
27
27
  """
@@ -32,7 +32,7 @@ class ValhallaLongUnits(str, Enum):
32
32
 
33
33
  @classmethod
34
34
  def from_json(cls, json_str: str) -> Self:
35
- """Create an instance of ValhallaLongUnits from a JSON string"""
35
+ """Create an instance of RoutingLongUnits from a JSON string"""
36
36
  return cls(json.loads(json_str))
37
37
 
38
38
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -21,8 +21,8 @@ import json
21
21
  from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional, Union
23
23
  from typing_extensions import Annotated
24
- from stadiamaps.models.pelias_layer import PeliasLayer
25
- from stadiamaps.models.pelias_source import PeliasSource
24
+ from stadiamaps.models.geocoding_layer import GeocodingLayer
25
+ from stadiamaps.models.geocoding_source import GeocodingSource
26
26
  from typing import Optional, Set
27
27
  from typing_extensions import Self
28
28
 
@@ -41,9 +41,9 @@ class SearchQuery(BaseModel):
41
41
  boundary_circle_lon: Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]] = Field(default=None, description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.", alias="boundary.circle.lon")
42
42
  boundary_circle_radius: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.", alias="boundary.circle.radius")
43
43
  boundary_country: Optional[List[StrictStr]] = Field(default=None, description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.", alias="boundary.country")
44
- boundary_gid: Optional[StrictStr] = Field(default=None, description="The Pelias GID of an area to limit the search to.", alias="boundary.gid")
45
- layers: Optional[List[PeliasLayer]] = Field(default=None, description="A list of layers to limit the search to.")
46
- sources: Optional[List[PeliasSource]] = Field(default=None, description="A list of sources to limit the search to.")
44
+ boundary_gid: Optional[StrictStr] = Field(default=None, description="The GID of an area to limit the search to.", alias="boundary.gid")
45
+ layers: Optional[List[GeocodingLayer]] = Field(default=None, description="A list of layers to limit the search to.")
46
+ sources: Optional[List[GeocodingSource]] = Field(default=None, description="A list of sources to limit the search to.")
47
47
  size: Optional[StrictInt] = Field(default=None, description="The maximum number of results to return.")
48
48
  lang: Optional[StrictStr] = Field(default=None, description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")
49
49
  additional_properties: Dict[str, Any] = {}
@@ -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
 
@@ -21,8 +21,8 @@ import json
21
21
  from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional, Union
23
23
  from typing_extensions import Annotated
24
- from stadiamaps.models.pelias_layer import PeliasLayer
25
- from stadiamaps.models.pelias_source import PeliasSource
24
+ from stadiamaps.models.geocoding_layer import GeocodingLayer
25
+ from stadiamaps.models.geocoding_source import GeocodingSource
26
26
  from typing import Optional, Set
27
27
  from typing_extensions import Self
28
28
 
@@ -48,9 +48,9 @@ class SearchStructuredQuery(BaseModel):
48
48
  boundary_circle_lon: Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]] = Field(default=None, description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.", alias="boundary.circle.lon")
49
49
  boundary_circle_radius: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.", alias="boundary.circle.radius")
50
50
  boundary_country: Optional[List[StrictStr]] = Field(default=None, description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.", alias="boundary.country")
51
- boundary_gid: Optional[StrictStr] = Field(default=None, description="The Pelias GID of an area to limit the search to.", alias="boundary.gid")
52
- layers: Optional[List[PeliasLayer]] = Field(default=None, description="A list of layers to limit the search to.")
53
- sources: Optional[List[PeliasSource]] = Field(default=None, description="A list of sources to limit the search to.")
51
+ boundary_gid: Optional[StrictStr] = Field(default=None, description="The GID of an area to limit the search to.", alias="boundary.gid")
52
+ layers: Optional[List[GeocodingLayer]] = Field(default=None, description="A list of layers to limit the search to.")
53
+ sources: Optional[List[GeocodingSource]] = Field(default=None, description="A list of sources to limit the search to.")
54
54
  size: Optional[StrictInt] = Field(default=None, description="The maximum number of results to return.")
55
55
  lang: Optional[StrictStr] = Field(default=None, description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")
56
56
  additional_properties: Dict[str, Any] = {}
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -84,23 +84,23 @@ class TraceAttributesBaseResponse(BaseModel):
84
84
  # override the default output from pydantic by calling `to_dict()` of each item in edges (list)
85
85
  _items = []
86
86
  if self.edges:
87
- for _item in self.edges:
88
- if _item:
89
- _items.append(_item.to_dict())
87
+ for _item_edges in self.edges:
88
+ if _item_edges:
89
+ _items.append(_item_edges.to_dict())
90
90
  _dict['edges'] = _items
91
91
  # override the default output from pydantic by calling `to_dict()` of each item in admins (list)
92
92
  _items = []
93
93
  if self.admins:
94
- for _item in self.admins:
95
- if _item:
96
- _items.append(_item.to_dict())
94
+ for _item_admins in self.admins:
95
+ if _item_admins:
96
+ _items.append(_item_admins.to_dict())
97
97
  _dict['admins'] = _items
98
98
  # override the default output from pydantic by calling `to_dict()` of each item in matched_points (list)
99
99
  _items = []
100
100
  if self.matched_points:
101
- for _item in self.matched_points:
102
- if _item:
103
- _items.append(_item.to_dict())
101
+ for _item_matched_points in self.matched_points:
102
+ if _item_matched_points:
103
+ _items.append(_item_matched_points.to_dict())
104
104
  _dict['matched_points'] = _items
105
105
  # puts key-value pairs in additional_properties in the top level
106
106
  if self.additional_properties is not None:
@@ -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
 
@@ -18,14 +18,14 @@ import pprint
18
18
  import re # noqa: F401
19
19
  import json
20
20
 
21
- from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
22
- from typing import Any, ClassVar, Dict, List, Optional
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional, Union
23
23
  from stadiamaps.models.costing_options import CostingOptions
24
24
  from stadiamaps.models.distance_unit import DistanceUnit
25
25
  from stadiamaps.models.map_match_costing_model import MapMatchCostingModel
26
26
  from stadiamaps.models.map_match_waypoint import MapMatchWaypoint
27
+ from stadiamaps.models.routing_languages import RoutingLanguages
27
28
  from stadiamaps.models.trace_attribute_filter_options import TraceAttributeFilterOptions
28
- from stadiamaps.models.valhalla_languages import ValhallaLanguages
29
29
  from typing import Optional, Set
30
30
  from typing_extensions import Self
31
31
 
@@ -40,11 +40,12 @@ class TraceAttributesRequest(BaseModel):
40
40
  costing_options: Optional[CostingOptions] = None
41
41
  shape_match: Optional[StrictStr] = Field(default=None, description="Three snapping modes provide some control over how the map matching occurs. `edge_walk` is fast, but requires extremely precise data that matches the route graph almost perfectly. `map_snap` can handle significantly noisier data, but is very expensive. `walk_or_snap`, the default, tries to use edge walking first and falls back to map matching if edge walking fails. In general, you should not need to change this parameter unless you want to trace a multi-leg route with multiple `break` locations in the `shape`.")
42
42
  units: Optional[DistanceUnit] = DistanceUnit.KM
43
- language: Optional[ValhallaLanguages] = ValhallaLanguages.EN_MINUS_US
43
+ language: Optional[RoutingLanguages] = RoutingLanguages.EN_MINUS_US
44
44
  directions_type: Optional[StrictStr] = Field(default='instructions', description="The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter.")
45
45
  filters: Optional[TraceAttributeFilterOptions] = Field(default=None, description="If present, provides either a whitelist or a blacklist of keys to include/exclude in the response. This key is optional, and if omitted from the request, all available info will be returned.")
46
+ elevation_interval: Optional[Union[StrictFloat, StrictInt]] = Field(default=0.0, description="If greater than zero, attempts to include elevation along the route at regular intervals. The \"native\" internal resolution is 30m, so we recommend you use this when possible. This number is interpreted as either meters or feet depending on the unit parameter. Elevation for route sections containing a bridge or tunnel is interpolated linearly. This doesn't always match the true elevation of the bridge/tunnel, but it prevents sharp artifacts from the surrounding terrain. This functionality is unique to the routing endpoints and is not available via the elevation API. NOTE: This has no effect on the OSRM response format.")
46
47
  additional_properties: Dict[str, Any] = {}
47
- __properties: ClassVar[List[str]] = ["id", "shape", "encoded_polyline", "costing", "costing_options", "shape_match", "units", "language", "directions_type", "filters"]
48
+ __properties: ClassVar[List[str]] = ["id", "shape", "encoded_polyline", "costing", "costing_options", "shape_match", "units", "language", "directions_type", "filters", "elevation_interval"]
48
49
 
49
50
  @field_validator('shape_match')
50
51
  def shape_match_validate_enum(cls, value):
@@ -110,9 +111,9 @@ class TraceAttributesRequest(BaseModel):
110
111
  # override the default output from pydantic by calling `to_dict()` of each item in shape (list)
111
112
  _items = []
112
113
  if self.shape:
113
- for _item in self.shape:
114
- if _item:
115
- _items.append(_item.to_dict())
114
+ for _item_shape in self.shape:
115
+ if _item_shape:
116
+ _items.append(_item_shape.to_dict())
116
117
  _dict['shape'] = _items
117
118
  # override the default output from pydantic by calling `to_dict()` of costing_options
118
119
  if self.costing_options:
@@ -144,9 +145,10 @@ class TraceAttributesRequest(BaseModel):
144
145
  "costing_options": CostingOptions.from_dict(obj["costing_options"]) if obj.get("costing_options") is not None else None,
145
146
  "shape_match": obj.get("shape_match"),
146
147
  "units": obj.get("units") if obj.get("units") is not None else DistanceUnit.KM,
147
- "language": obj.get("language") if obj.get("language") is not None else ValhallaLanguages.EN_MINUS_US,
148
+ "language": obj.get("language") if obj.get("language") is not None else RoutingLanguages.EN_MINUS_US,
148
149
  "directions_type": obj.get("directions_type") if obj.get("directions_type") is not None else 'instructions',
149
- "filters": TraceAttributeFilterOptions.from_dict(obj["filters"]) if obj.get("filters") is not None else None
150
+ "filters": TraceAttributeFilterOptions.from_dict(obj["filters"]) if obj.get("filters") is not None else None,
151
+ "elevation_interval": obj.get("elevation_interval") if obj.get("elevation_interval") is not None else 0.0
150
152
  })
151
153
  # store additional fields in additional_properties
152
154
  for _key in obj.keys():
@@ -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
 
@@ -23,9 +23,9 @@ from typing import Any, ClassVar, Dict, List, Optional, Union
23
23
  from typing_extensions import Annotated
24
24
  from stadiamaps.models.admin_region import AdminRegion
25
25
  from stadiamaps.models.matched_point import MatchedPoint
26
+ from stadiamaps.models.routing_long_units import RoutingLongUnits
26
27
  from stadiamaps.models.trace_attributes_base_response import TraceAttributesBaseResponse
27
28
  from stadiamaps.models.trace_edge import TraceEdge
28
- from stadiamaps.models.valhalla_long_units import ValhallaLongUnits
29
29
  from typing import Optional, Set
30
30
  from typing_extensions import Self
31
31
 
@@ -40,7 +40,7 @@ class TraceAttributesResponse(BaseModel):
40
40
  shape: Optional[StrictStr] = Field(default=None, description="The encoded polyline (https://developers.google.com/maps/documentation/utilities/polylinealgorithm) of the matched path.")
41
41
  confidence_score: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = None
42
42
  id: Optional[StrictStr] = Field(default=None, description="An identifier to disambiguate requests (echoed by the server).")
43
- units: Optional[ValhallaLongUnits] = ValhallaLongUnits.KILOMETERS
43
+ units: Optional[RoutingLongUnits] = RoutingLongUnits.KILOMETERS
44
44
  alternate_paths: Optional[List[TraceAttributesBaseResponse]] = Field(default=None, description="Alternate paths, if any, that were not classified as the best match.")
45
45
  additional_properties: Dict[str, Any] = {}
46
46
  __properties: ClassVar[List[str]] = ["edges", "admins", "matched_points", "osm_changeset", "shape", "confidence_score", "id", "units", "alternate_paths"]
@@ -89,30 +89,30 @@ class TraceAttributesResponse(BaseModel):
89
89
  # override the default output from pydantic by calling `to_dict()` of each item in edges (list)
90
90
  _items = []
91
91
  if self.edges:
92
- for _item in self.edges:
93
- if _item:
94
- _items.append(_item.to_dict())
92
+ for _item_edges in self.edges:
93
+ if _item_edges:
94
+ _items.append(_item_edges.to_dict())
95
95
  _dict['edges'] = _items
96
96
  # override the default output from pydantic by calling `to_dict()` of each item in admins (list)
97
97
  _items = []
98
98
  if self.admins:
99
- for _item in self.admins:
100
- if _item:
101
- _items.append(_item.to_dict())
99
+ for _item_admins in self.admins:
100
+ if _item_admins:
101
+ _items.append(_item_admins.to_dict())
102
102
  _dict['admins'] = _items
103
103
  # override the default output from pydantic by calling `to_dict()` of each item in matched_points (list)
104
104
  _items = []
105
105
  if self.matched_points:
106
- for _item in self.matched_points:
107
- if _item:
108
- _items.append(_item.to_dict())
106
+ for _item_matched_points in self.matched_points:
107
+ if _item_matched_points:
108
+ _items.append(_item_matched_points.to_dict())
109
109
  _dict['matched_points'] = _items
110
110
  # override the default output from pydantic by calling `to_dict()` of each item in alternate_paths (list)
111
111
  _items = []
112
112
  if self.alternate_paths:
113
- for _item in self.alternate_paths:
114
- if _item:
115
- _items.append(_item.to_dict())
113
+ for _item_alternate_paths in self.alternate_paths:
114
+ if _item_alternate_paths:
115
+ _items.append(_item_alternate_paths.to_dict())
116
116
  _dict['alternate_paths'] = _items
117
117
  # puts key-value pairs in additional_properties in the top level
118
118
  if self.additional_properties is not None:
@@ -143,7 +143,7 @@ class TraceAttributesResponse(BaseModel):
143
143
  "shape": obj.get("shape"),
144
144
  "confidence_score": obj.get("confidence_score"),
145
145
  "id": obj.get("id"),
146
- "units": obj.get("units") if obj.get("units") is not None else ValhallaLongUnits.KILOMETERS,
146
+ "units": obj.get("units") if obj.get("units") is not None else RoutingLongUnits.KILOMETERS,
147
147
  "alternate_paths": [TraceAttributesBaseResponse.from_dict(_item) for _item in obj["alternate_paths"]] if obj.get("alternate_paths") is not None else None
148
148
  })
149
149
  # store additional fields in additional_properties
@@ -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
 
@@ -59,7 +59,7 @@ class TraceEdge(BaseModel):
59
59
  transit_type: Optional[StrictStr] = None
60
60
  id: Optional[StrictInt] = None
61
61
  way_id: Optional[StrictInt] = Field(default=None, description="The way identifier of the edge in OSM.")
62
- weighted_grade: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The weighted grade factor. Valhalla manufactures a weighted grade from elevation data. It is a measure used for hill avoidance in routing - sort of a relative energy use along an edge. But since an edge in Valhalla can possibly go up and down over several hills it might not equate to what you would normally think of as grade.")
62
+ weighted_grade: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The weighted grade factor. The weighted grade is derived from elevation data. It is a measure used for hill avoidance in routing - sort of a relative energy use along an edge. But since an edge can possibly go up and down over several hills, it might not equate to what you would normally think of as grade.")
63
63
  max_upward_grade: Optional[StrictInt] = Field(default=None, description="The maximum upward slope. A value of 32768 indicates no elevation data is available for this edge.")
64
64
  max_downward_grade: Optional[StrictInt] = Field(default=None, description="The maximum downward slope. A value of 32768 indicates no elevation data is available for this edge.")
65
65
  mean_elevation: Optional[StrictInt] = Field(default=None, description="The mean elevation along the edge. Units are meters by default. If the `units` are specified as miles, then the mean elevation is returned in feet. A value of 32768 indicates no elevation data is available for this edge.")
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
stadiamaps/rest.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
 
@@ -226,7 +226,7 @@ class RESTClientObject:
226
226
  headers=headers,
227
227
  preload_content=False
228
228
  )
229
- elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool):
229
+ elif headers['Content-Type'].startswith('text/') and isinstance(body, bool):
230
230
  request_body = "true" if body else "false"
231
231
  r = self.pool_manager.request(
232
232
  method,
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: stadiamaps
3
- Version: 3.2.1
3
+ Version: 5.0.0
4
4
  Summary: Stadia Maps Geospatial APIs
5
5
  Home-page: https://github.com/stadiamaps/stadiamaps-api-py
6
6
  Author: Stadia Maps Support
@@ -8,10 +8,18 @@ Author-email: support@stadiamaps.com
8
8
  Keywords: OpenAPI,OpenAPI-Generator,Stadia Maps Geospatial APIs
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE.txt
11
- Requires-Dist: urllib3 <2.1.0,>=1.25.3
12
- Requires-Dist: python-dateutil
13
- Requires-Dist: pydantic >=2
14
- Requires-Dist: typing-extensions >=4.7.1
11
+ Requires-Dist: urllib3<3.0.0,>=1.25.3
12
+ Requires-Dist: python-dateutil>=2.8.2
13
+ Requires-Dist: pydantic>=2
14
+ Requires-Dist: typing-extensions>=4.7.1
15
+ Dynamic: author
16
+ Dynamic: author-email
17
+ Dynamic: description
18
+ Dynamic: description-content-type
19
+ Dynamic: home-page
20
+ Dynamic: keywords
21
+ Dynamic: requires-dist
22
+ Dynamic: summary
15
23
 
16
24
 
17
25
  # Stadia Maps Python API Client