google-maps-isochrones 0.1.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 (24) hide show
  1. google/maps/isochrones/__init__.py +39 -0
  2. google/maps/isochrones/gapic_version.py +16 -0
  3. google/maps/isochrones/py.typed +2 -0
  4. google/maps/isochrones_v1/__init__.py +125 -0
  5. google/maps/isochrones_v1/gapic_metadata.json +43 -0
  6. google/maps/isochrones_v1/gapic_version.py +16 -0
  7. google/maps/isochrones_v1/py.typed +2 -0
  8. google/maps/isochrones_v1/services/__init__.py +15 -0
  9. google/maps/isochrones_v1/services/isochrone_service/__init__.py +22 -0
  10. google/maps/isochrones_v1/services/isochrone_service/async_client.py +399 -0
  11. google/maps/isochrones_v1/services/isochrone_service/client.py +831 -0
  12. google/maps/isochrones_v1/services/isochrone_service/transports/__init__.py +36 -0
  13. google/maps/isochrones_v1/services/isochrone_service/transports/base.py +190 -0
  14. google/maps/isochrones_v1/services/isochrone_service/transports/grpc.py +368 -0
  15. google/maps/isochrones_v1/services/isochrone_service/transports/grpc_asyncio.py +400 -0
  16. google/maps/isochrones_v1/services/isochrone_service/transports/rest.py +412 -0
  17. google/maps/isochrones_v1/services/isochrone_service/transports/rest_base.py +148 -0
  18. google/maps/isochrones_v1/types/__init__.py +26 -0
  19. google/maps/isochrones_v1/types/isochrones_service.py +247 -0
  20. google_maps_isochrones-0.1.0.dist-info/METADATA +239 -0
  21. google_maps_isochrones-0.1.0.dist-info/RECORD +24 -0
  22. google_maps_isochrones-0.1.0.dist-info/WHEEL +5 -0
  23. google_maps_isochrones-0.1.0.dist-info/licenses/LICENSE +202 -0
  24. google_maps_isochrones-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,39 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2026 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ from google.maps.isochrones import gapic_version as package_version
17
+
18
+ __version__ = package_version.__version__
19
+
20
+
21
+ from google.maps.isochrones_v1.services.isochrone_service.async_client import (
22
+ IsochroneServiceAsyncClient,
23
+ )
24
+ from google.maps.isochrones_v1.services.isochrone_service.client import (
25
+ IsochroneServiceClient,
26
+ )
27
+ from google.maps.isochrones_v1.types.isochrones_service import (
28
+ GenerateIsochroneRequest,
29
+ GenerateIsochroneResponse,
30
+ Isochrone,
31
+ )
32
+
33
+ __all__ = (
34
+ "IsochroneServiceClient",
35
+ "IsochroneServiceAsyncClient",
36
+ "GenerateIsochroneRequest",
37
+ "GenerateIsochroneResponse",
38
+ "Isochrone",
39
+ )
@@ -0,0 +1,16 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2026 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ __version__ = "0.1.0" # {x-release-please-version}
@@ -0,0 +1,2 @@
1
+ # Marker file for PEP 561.
2
+ # The google-maps-isochrones package uses inline types.
@@ -0,0 +1,125 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2026 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ import sys
17
+
18
+ import google.api_core as api_core
19
+
20
+ from google.maps.isochrones_v1 import gapic_version as package_version
21
+
22
+ __version__ = package_version.__version__
23
+
24
+ from importlib import metadata
25
+
26
+ from .services.isochrone_service import (
27
+ IsochroneServiceAsyncClient,
28
+ IsochroneServiceClient,
29
+ )
30
+ from .types.isochrones_service import (
31
+ GenerateIsochroneRequest,
32
+ GenerateIsochroneResponse,
33
+ Isochrone,
34
+ )
35
+
36
+ if hasattr(api_core, "check_python_version") and hasattr(
37
+ api_core, "check_dependency_versions"
38
+ ): # pragma: NO COVER
39
+ api_core.check_python_version("google.maps.isochrones_v1") # type: ignore
40
+ api_core.check_dependency_versions("google.maps.isochrones_v1") # type: ignore
41
+ else: # pragma: NO COVER
42
+ # An older version of api_core is installed which does not define the
43
+ # functions above. We do equivalent checks manually.
44
+ try:
45
+ import warnings
46
+
47
+ _py_version_str = sys.version.split()[0]
48
+ _package_label = "google.maps.isochrones_v1"
49
+ if sys.version_info < (3, 10):
50
+ warnings.warn(
51
+ "You are using a non-supported Python version "
52
+ + f"({_py_version_str}). Google will not post any further "
53
+ + f"updates to {_package_label} supporting this Python version. "
54
+ + "Please upgrade to the latest Python version, or at "
55
+ + f"least to Python 3.10, and then update {_package_label}.",
56
+ FutureWarning,
57
+ )
58
+
59
+ def parse_version_to_tuple(version_string: str):
60
+ """Safely converts a semantic version string to a comparable tuple of integers.
61
+ Example: "6.33.5" -> (6, 33, 5)
62
+ Ignores non-numeric parts and handles common version formats.
63
+ Args:
64
+ version_string: Version string in the format "x.y.z" or "x.y.z<suffix>"
65
+ Returns:
66
+ Tuple of integers for the parsed version string.
67
+ """
68
+ parts = []
69
+ for part in version_string.split("."):
70
+ try:
71
+ parts.append(int(part))
72
+ except ValueError:
73
+ # If it's a non-numeric part (e.g., '1.0.0b1' -> 'b1'), stop here.
74
+ # This is a simplification compared to 'packaging.parse_version', but sufficient
75
+ # for comparing strictly numeric semantic versions.
76
+ break
77
+ return tuple(parts)
78
+
79
+ def _get_version(dependency_name):
80
+ try:
81
+ version_string: str = metadata.version(dependency_name)
82
+ parsed_version = parse_version_to_tuple(version_string)
83
+ return (parsed_version, version_string)
84
+ except Exception:
85
+ # Catch exceptions from metadata.version() (e.g., PackageNotFoundError)
86
+ # or errors during parse_version_to_tuple
87
+ return (None, "--")
88
+
89
+ _dependency_package = "google.protobuf"
90
+ _next_supported_version = "6.33.5"
91
+ _next_supported_version_tuple = (6, 33, 5)
92
+ _recommendation = " (we recommend 7.x)"
93
+ (_version_used, _version_used_string) = _get_version(_dependency_package)
94
+ if _version_used and _version_used < _next_supported_version_tuple:
95
+ warnings.warn(
96
+ f"Package {_package_label} depends on "
97
+ + f"{_dependency_package}, currently installed at version "
98
+ + f"{_version_used_string}. Future updates to "
99
+ + f"{_package_label} will require {_dependency_package} at "
100
+ + f"version {_next_supported_version} or higher{_recommendation}."
101
+ + " Please ensure "
102
+ + "that either (a) your Python environment doesn't pin the "
103
+ + f"version of {_dependency_package}, so that updates to "
104
+ + f"{_package_label} can require the higher version, or "
105
+ + "(b) you manually update your Python environment to use at "
106
+ + f"least version {_next_supported_version} of "
107
+ + f"{_dependency_package}.",
108
+ FutureWarning,
109
+ )
110
+ except Exception:
111
+ warnings.warn(
112
+ "Could not determine the version of Python "
113
+ + "currently being used. To continue receiving "
114
+ + "updates for {_package_label}, ensure you are "
115
+ + "using a supported version of Python; see "
116
+ + "https://devguide.python.org/versions/"
117
+ )
118
+
119
+ __all__ = (
120
+ "IsochroneServiceAsyncClient",
121
+ "GenerateIsochroneRequest",
122
+ "GenerateIsochroneResponse",
123
+ "Isochrone",
124
+ "IsochroneServiceClient",
125
+ )
@@ -0,0 +1,43 @@
1
+ {
2
+ "comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
3
+ "language": "python",
4
+ "libraryPackage": "google.maps.isochrones_v1",
5
+ "protoPackage": "google.maps.isochrones.v1",
6
+ "schema": "1.0",
7
+ "services": {
8
+ "IsochroneService": {
9
+ "clients": {
10
+ "grpc": {
11
+ "libraryClient": "IsochroneServiceClient",
12
+ "rpcs": {
13
+ "GenerateIsochrone": {
14
+ "methods": [
15
+ "generate_isochrone"
16
+ ]
17
+ }
18
+ }
19
+ },
20
+ "grpc-async": {
21
+ "libraryClient": "IsochroneServiceAsyncClient",
22
+ "rpcs": {
23
+ "GenerateIsochrone": {
24
+ "methods": [
25
+ "generate_isochrone"
26
+ ]
27
+ }
28
+ }
29
+ },
30
+ "rest": {
31
+ "libraryClient": "IsochroneServiceClient",
32
+ "rpcs": {
33
+ "GenerateIsochrone": {
34
+ "methods": [
35
+ "generate_isochrone"
36
+ ]
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,16 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2026 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ __version__ = "0.1.0" # {x-release-please-version}
@@ -0,0 +1,2 @@
1
+ # Marker file for PEP 561.
2
+ # The google-maps-isochrones package uses inline types.
@@ -0,0 +1,15 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2026 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
@@ -0,0 +1,22 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2026 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ from .async_client import IsochroneServiceAsyncClient
17
+ from .client import IsochroneServiceClient
18
+
19
+ __all__ = (
20
+ "IsochroneServiceClient",
21
+ "IsochroneServiceAsyncClient",
22
+ )