google-maps-geocode 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 (34) hide show
  1. google/maps/geocode/__init__.py +69 -0
  2. google/maps/geocode/gapic_version.py +16 -0
  3. google/maps/geocode/py.typed +2 -0
  4. google/maps/geocode_v4/__init__.py +169 -0
  5. google/maps/geocode_v4/gapic_metadata.json +107 -0
  6. google/maps/geocode_v4/gapic_version.py +16 -0
  7. google/maps/geocode_v4/py.typed +2 -0
  8. google/maps/geocode_v4/services/__init__.py +15 -0
  9. google/maps/geocode_v4/services/destination_service/__init__.py +22 -0
  10. google/maps/geocode_v4/services/destination_service/async_client.py +404 -0
  11. google/maps/geocode_v4/services/destination_service/client.py +817 -0
  12. google/maps/geocode_v4/services/destination_service/transports/__init__.py +36 -0
  13. google/maps/geocode_v4/services/destination_service/transports/base.py +185 -0
  14. google/maps/geocode_v4/services/destination_service/transports/grpc.py +368 -0
  15. google/maps/geocode_v4/services/destination_service/transports/grpc_asyncio.py +400 -0
  16. google/maps/geocode_v4/services/destination_service/transports/rest.py +412 -0
  17. google/maps/geocode_v4/services/destination_service/transports/rest_base.py +133 -0
  18. google/maps/geocode_v4/services/geocode_service/__init__.py +22 -0
  19. google/maps/geocode_v4/services/geocode_service/async_client.py +564 -0
  20. google/maps/geocode_v4/services/geocode_service/client.py +974 -0
  21. google/maps/geocode_v4/services/geocode_service/transports/__init__.py +36 -0
  22. google/maps/geocode_v4/services/geocode_service/transports/base.py +236 -0
  23. google/maps/geocode_v4/services/geocode_service/transports/grpc.py +420 -0
  24. google/maps/geocode_v4/services/geocode_service/transports/grpc_asyncio.py +483 -0
  25. google/maps/geocode_v4/services/geocode_service/transports/rest.py +823 -0
  26. google/maps/geocode_v4/services/geocode_service/transports/rest_base.py +210 -0
  27. google/maps/geocode_v4/types/__init__.py +50 -0
  28. google/maps/geocode_v4/types/destination_service.py +692 -0
  29. google/maps/geocode_v4/types/geocode_service.py +475 -0
  30. google_maps_geocode-0.1.0.dist-info/METADATA +245 -0
  31. google_maps_geocode-0.1.0.dist-info/RECORD +34 -0
  32. google_maps_geocode-0.1.0.dist-info/WHEEL +5 -0
  33. google_maps_geocode-0.1.0.dist-info/licenses/LICENSE +202 -0
  34. google_maps_geocode-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,69 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2025 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.geocode import gapic_version as package_version
17
+
18
+ __version__ = package_version.__version__
19
+
20
+
21
+ from google.maps.geocode_v4.services.destination_service.async_client import (
22
+ DestinationServiceAsyncClient,
23
+ )
24
+ from google.maps.geocode_v4.services.destination_service.client import (
25
+ DestinationServiceClient,
26
+ )
27
+ from google.maps.geocode_v4.services.geocode_service.async_client import (
28
+ GeocodeServiceAsyncClient,
29
+ )
30
+ from google.maps.geocode_v4.services.geocode_service.client import GeocodeServiceClient
31
+ from google.maps.geocode_v4.types.destination_service import (
32
+ Destination,
33
+ Entrance,
34
+ Landmark,
35
+ NavigationPoint,
36
+ PlaceView,
37
+ SearchDestinationsRequest,
38
+ SearchDestinationsResponse,
39
+ )
40
+ from google.maps.geocode_v4.types.geocode_service import (
41
+ GeocodeAddressRequest,
42
+ GeocodeAddressResponse,
43
+ GeocodeLocationRequest,
44
+ GeocodeLocationResponse,
45
+ GeocodePlaceRequest,
46
+ GeocodeResult,
47
+ PlusCode,
48
+ )
49
+
50
+ __all__ = (
51
+ "DestinationServiceClient",
52
+ "DestinationServiceAsyncClient",
53
+ "GeocodeServiceClient",
54
+ "GeocodeServiceAsyncClient",
55
+ "Destination",
56
+ "Entrance",
57
+ "Landmark",
58
+ "NavigationPoint",
59
+ "PlaceView",
60
+ "SearchDestinationsRequest",
61
+ "SearchDestinationsResponse",
62
+ "GeocodeAddressRequest",
63
+ "GeocodeAddressResponse",
64
+ "GeocodeLocationRequest",
65
+ "GeocodeLocationResponse",
66
+ "GeocodePlaceRequest",
67
+ "GeocodeResult",
68
+ "PlusCode",
69
+ )
@@ -0,0 +1,16 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2025 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-geocode package uses inline types.
@@ -0,0 +1,169 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2025 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.geocode_v4 import gapic_version as package_version
21
+
22
+ __version__ = package_version.__version__
23
+
24
+ if sys.version_info >= (3, 8): # pragma: NO COVER
25
+ from importlib import metadata
26
+ else: # pragma: NO COVER
27
+ # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove
28
+ # this code path once we drop support for Python 3.7
29
+ import importlib_metadata as metadata
30
+
31
+
32
+ from .services.destination_service import (
33
+ DestinationServiceAsyncClient,
34
+ DestinationServiceClient,
35
+ )
36
+ from .services.geocode_service import GeocodeServiceAsyncClient, GeocodeServiceClient
37
+ from .types.destination_service import (
38
+ Destination,
39
+ Entrance,
40
+ Landmark,
41
+ NavigationPoint,
42
+ PlaceView,
43
+ SearchDestinationsRequest,
44
+ SearchDestinationsResponse,
45
+ )
46
+ from .types.geocode_service import (
47
+ GeocodeAddressRequest,
48
+ GeocodeAddressResponse,
49
+ GeocodeLocationRequest,
50
+ GeocodeLocationResponse,
51
+ GeocodePlaceRequest,
52
+ GeocodeResult,
53
+ PlusCode,
54
+ )
55
+
56
+ if hasattr(api_core, "check_python_version") and hasattr(
57
+ api_core, "check_dependency_versions"
58
+ ): # pragma: NO COVER
59
+ api_core.check_python_version("google.maps.geocode_v4") # type: ignore
60
+ api_core.check_dependency_versions("google.maps.geocode_v4") # type: ignore
61
+ else: # pragma: NO COVER
62
+ # An older version of api_core is installed which does not define the
63
+ # functions above. We do equivalent checks manually.
64
+ try:
65
+ import sys
66
+ import warnings
67
+
68
+ _py_version_str = sys.version.split()[0]
69
+ _package_label = "google.maps.geocode_v4"
70
+ if sys.version_info < (3, 9):
71
+ warnings.warn(
72
+ "You are using a non-supported Python version "
73
+ + f"({_py_version_str}). Google will not post any further "
74
+ + f"updates to {_package_label} supporting this Python version. "
75
+ + "Please upgrade to the latest Python version, or at "
76
+ + f"least to Python 3.9, and then update {_package_label}.",
77
+ FutureWarning,
78
+ )
79
+ if sys.version_info[:2] == (3, 9):
80
+ warnings.warn(
81
+ f"You are using a Python version ({_py_version_str}) "
82
+ + f"which Google will stop supporting in {_package_label} in "
83
+ + "January 2026. Please "
84
+ + "upgrade to the latest Python version, or at "
85
+ + "least to Python 3.10, before then, and "
86
+ + f"then update {_package_label}.",
87
+ FutureWarning,
88
+ )
89
+
90
+ def parse_version_to_tuple(version_string: str):
91
+ """Safely converts a semantic version string to a comparable tuple of integers.
92
+ Example: "4.25.8" -> (4, 25, 8)
93
+ Ignores non-numeric parts and handles common version formats.
94
+ Args:
95
+ version_string: Version string in the format "x.y.z" or "x.y.z<suffix>"
96
+ Returns:
97
+ Tuple of integers for the parsed version string.
98
+ """
99
+ parts = []
100
+ for part in version_string.split("."):
101
+ try:
102
+ parts.append(int(part))
103
+ except ValueError:
104
+ # If it's a non-numeric part (e.g., '1.0.0b1' -> 'b1'), stop here.
105
+ # This is a simplification compared to 'packaging.parse_version', but sufficient
106
+ # for comparing strictly numeric semantic versions.
107
+ break
108
+ return tuple(parts)
109
+
110
+ def _get_version(dependency_name):
111
+ try:
112
+ version_string: str = metadata.version(dependency_name)
113
+ parsed_version = parse_version_to_tuple(version_string)
114
+ return (parsed_version, version_string)
115
+ except Exception:
116
+ # Catch exceptions from metadata.version() (e.g., PackageNotFoundError)
117
+ # or errors during parse_version_to_tuple
118
+ return (None, "--")
119
+
120
+ _dependency_package = "google.protobuf"
121
+ _next_supported_version = "4.25.8"
122
+ _next_supported_version_tuple = (4, 25, 8)
123
+ _recommendation = " (we recommend 6.x)"
124
+ (_version_used, _version_used_string) = _get_version(_dependency_package)
125
+ if _version_used and _version_used < _next_supported_version_tuple:
126
+ warnings.warn(
127
+ f"Package {_package_label} depends on "
128
+ + f"{_dependency_package}, currently installed at version "
129
+ + f"{_version_used_string}. Future updates to "
130
+ + f"{_package_label} will require {_dependency_package} at "
131
+ + f"version {_next_supported_version} or higher{_recommendation}."
132
+ + " Please ensure "
133
+ + "that either (a) your Python environment doesn't pin the "
134
+ + f"version of {_dependency_package}, so that updates to "
135
+ + f"{_package_label} can require the higher version, or "
136
+ + "(b) you manually update your Python environment to use at "
137
+ + f"least version {_next_supported_version} of "
138
+ + f"{_dependency_package}.",
139
+ FutureWarning,
140
+ )
141
+ except Exception:
142
+ warnings.warn(
143
+ "Could not determine the version of Python "
144
+ + "currently being used. To continue receiving "
145
+ + "updates for {_package_label}, ensure you are "
146
+ + "using a supported version of Python; see "
147
+ + "https://devguide.python.org/versions/"
148
+ )
149
+
150
+ __all__ = (
151
+ "DestinationServiceAsyncClient",
152
+ "GeocodeServiceAsyncClient",
153
+ "Destination",
154
+ "DestinationServiceClient",
155
+ "Entrance",
156
+ "GeocodeAddressRequest",
157
+ "GeocodeAddressResponse",
158
+ "GeocodeLocationRequest",
159
+ "GeocodeLocationResponse",
160
+ "GeocodePlaceRequest",
161
+ "GeocodeResult",
162
+ "GeocodeServiceClient",
163
+ "Landmark",
164
+ "NavigationPoint",
165
+ "PlaceView",
166
+ "PlusCode",
167
+ "SearchDestinationsRequest",
168
+ "SearchDestinationsResponse",
169
+ )
@@ -0,0 +1,107 @@
1
+ {
2
+ "comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
3
+ "language": "python",
4
+ "libraryPackage": "google.maps.geocode_v4",
5
+ "protoPackage": "google.maps.geocode.v4",
6
+ "schema": "1.0",
7
+ "services": {
8
+ "DestinationService": {
9
+ "clients": {
10
+ "grpc": {
11
+ "libraryClient": "DestinationServiceClient",
12
+ "rpcs": {
13
+ "SearchDestinations": {
14
+ "methods": [
15
+ "search_destinations"
16
+ ]
17
+ }
18
+ }
19
+ },
20
+ "grpc-async": {
21
+ "libraryClient": "DestinationServiceAsyncClient",
22
+ "rpcs": {
23
+ "SearchDestinations": {
24
+ "methods": [
25
+ "search_destinations"
26
+ ]
27
+ }
28
+ }
29
+ },
30
+ "rest": {
31
+ "libraryClient": "DestinationServiceClient",
32
+ "rpcs": {
33
+ "SearchDestinations": {
34
+ "methods": [
35
+ "search_destinations"
36
+ ]
37
+ }
38
+ }
39
+ }
40
+ }
41
+ },
42
+ "GeocodeService": {
43
+ "clients": {
44
+ "grpc": {
45
+ "libraryClient": "GeocodeServiceClient",
46
+ "rpcs": {
47
+ "GeocodeAddress": {
48
+ "methods": [
49
+ "geocode_address"
50
+ ]
51
+ },
52
+ "GeocodeLocation": {
53
+ "methods": [
54
+ "geocode_location"
55
+ ]
56
+ },
57
+ "GeocodePlace": {
58
+ "methods": [
59
+ "geocode_place"
60
+ ]
61
+ }
62
+ }
63
+ },
64
+ "grpc-async": {
65
+ "libraryClient": "GeocodeServiceAsyncClient",
66
+ "rpcs": {
67
+ "GeocodeAddress": {
68
+ "methods": [
69
+ "geocode_address"
70
+ ]
71
+ },
72
+ "GeocodeLocation": {
73
+ "methods": [
74
+ "geocode_location"
75
+ ]
76
+ },
77
+ "GeocodePlace": {
78
+ "methods": [
79
+ "geocode_place"
80
+ ]
81
+ }
82
+ }
83
+ },
84
+ "rest": {
85
+ "libraryClient": "GeocodeServiceClient",
86
+ "rpcs": {
87
+ "GeocodeAddress": {
88
+ "methods": [
89
+ "geocode_address"
90
+ ]
91
+ },
92
+ "GeocodeLocation": {
93
+ "methods": [
94
+ "geocode_location"
95
+ ]
96
+ },
97
+ "GeocodePlace": {
98
+ "methods": [
99
+ "geocode_place"
100
+ ]
101
+ }
102
+ }
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
@@ -0,0 +1,16 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2025 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-geocode package uses inline types.
@@ -0,0 +1,15 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2025 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 2025 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 DestinationServiceAsyncClient
17
+ from .client import DestinationServiceClient
18
+
19
+ __all__ = (
20
+ "DestinationServiceClient",
21
+ "DestinationServiceAsyncClient",
22
+ )