| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| { | ||
| "packages/google-cloud-workloadidentity": "0.1.0", | ||
| "packages/google-cloud-ftp": "0.1.0", | ||
| "packages/google-cloud-workloadidentity": "0.1.0", | ||
| "packages/google-crc32c": "1.8.0", | ||
| "packages/google-maps-mapmanagement": "0.1.0", | ||
| "preview-packages/google-cloud-compute": "1.51.0-preview.1" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| MapManagement | ||
| ------------------------------- | ||
|
|
||
| .. automodule:: google.maps.mapmanagement_v2.services.map_management | ||
| :members: | ||
| :inherited-members: | ||
|
|
||
| .. automodule:: google.maps.mapmanagement_v2.services.map_management.pagers | ||
| :members: | ||
| :inherited-members: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| Services for Google Maps Mapmanagement v2 API | ||
| ============================================= | ||
| .. toctree:: | ||
| :maxdepth: 2 | ||
|
|
||
| map_management |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| Types for Google Maps Mapmanagement v2 API | ||
| ========================================== | ||
|
|
||
| .. automodule:: google.maps.mapmanagement_v2.types | ||
| :members: | ||
| :show-inheritance: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,176 @@ | ||
| # -*- coding: utf-8 -*- | ||
| # Copyright 2026 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| import sys | ||
|
|
||
| import google.api_core as api_core | ||
|
|
||
| from google.maps.mapmanagement_v2 import gapic_version as package_version | ||
|
|
||
| __version__ = package_version.__version__ | ||
|
|
||
| from importlib import metadata | ||
|
|
||
| # PEP 0810: Explicit Lazy Imports | ||
| # Python 3.15+ natively intercepts and defers these imports. | ||
| # Developers can disable this behavior and force eager imports. | ||
| # For more information, see: | ||
| # https://docs.python.org/3.15/library/sys.html#sys.set_lazy_imports_filter | ||
| # Older Python versions safely ignore this variable. | ||
| __lazy_modules__ = { | ||
| "google.maps.mapmanagement_v2.services.map_management", | ||
| "google.maps.mapmanagement_v2.types.map_management_service", | ||
| } | ||
|
|
||
|
|
||
| from .services.map_management import MapManagementAsyncClient, MapManagementClient | ||
| from .types.map_management_service import ( | ||
| CreateMapConfigRequest, | ||
| CreateMapContextConfigRequest, | ||
| CreateStyleConfigRequest, | ||
| DeleteMapConfigRequest, | ||
| DeleteMapContextConfigRequest, | ||
| DeleteStyleConfigRequest, | ||
| GetMapConfigRequest, | ||
| GetMapContextConfigRequest, | ||
| GetStyleConfigRequest, | ||
| ListMapConfigsRequest, | ||
| ListMapConfigsResponse, | ||
| ListMapContextConfigsRequest, | ||
| ListMapContextConfigsResponse, | ||
| ListStyleConfigsRequest, | ||
| ListStyleConfigsResponse, | ||
| MapConfig, | ||
| MapContextConfig, | ||
| MapFeatures, | ||
| MapRenderingType, | ||
| StyleConfig, | ||
| StyleConfigView, | ||
| UpdateMapConfigRequest, | ||
| UpdateMapContextConfigRequest, | ||
| UpdateStyleConfigRequest, | ||
| ) | ||
|
|
||
| if hasattr(api_core, "check_python_version") and hasattr( | ||
| api_core, "check_dependency_versions" | ||
| ): # pragma: NO COVER | ||
| api_core.check_python_version("google.maps.mapmanagement_v2") # type: ignore | ||
| api_core.check_dependency_versions("google.maps.mapmanagement_v2") # type: ignore | ||
| else: # pragma: NO COVER | ||
| # An older version of api_core is installed which does not define the | ||
| # functions above. We do equivalent checks manually. | ||
| try: | ||
| import warnings | ||
|
|
||
| _py_version_str = sys.version.split()[0] | ||
| _package_label = "google.maps.mapmanagement_v2" | ||
| if sys.version_info < (3, 10): | ||
| warnings.warn( | ||
| "You are using a non-supported Python version " | ||
| + f"({_py_version_str}). Google will not post any further " | ||
| + f"updates to {_package_label} supporting this Python version. " | ||
| + "Please upgrade to the latest Python version, or at " | ||
| + f"least to Python 3.10, and then update {_package_label}.", | ||
| FutureWarning, | ||
| ) | ||
|
|
||
| def parse_version_to_tuple(version_string: str): | ||
| """Safely converts a semantic version string to a comparable tuple of integers. | ||
| Example: "6.33.5" -> (6, 33, 5) | ||
| Ignores non-numeric parts and handles common version formats. | ||
| Args: | ||
| version_string: Version string in the format "x.y.z" or "x.y.z<suffix>" | ||
| Returns: | ||
| Tuple of integers for the parsed version string. | ||
| """ | ||
| parts = [] | ||
| for part in version_string.split("."): | ||
| try: | ||
| parts.append(int(part)) | ||
| except ValueError: | ||
| # If it's a non-numeric part (e.g., '1.0.0b1' -> 'b1'), stop here. | ||
| # This is a simplification compared to 'packaging.parse_version', but sufficient | ||
| # for comparing strictly numeric semantic versions. | ||
| break | ||
| return tuple(parts) | ||
|
|
||
| def _get_version(dependency_name): | ||
| try: | ||
| version_string: str = metadata.version(dependency_name) | ||
| parsed_version = parse_version_to_tuple(version_string) | ||
| return (parsed_version, version_string) | ||
| except Exception: | ||
| # Catch exceptions from metadata.version() (e.g., PackageNotFoundError) | ||
| # or errors during parse_version_to_tuple | ||
| return (None, "--") | ||
|
|
||
| _dependency_package = "google.protobuf" | ||
| _next_supported_version = "6.33.5" | ||
| _next_supported_version_tuple = (6, 33, 5) | ||
| _recommendation = " (we recommend 7.x)" | ||
| (_version_used, _version_used_string) = _get_version(_dependency_package) | ||
| if _version_used and _version_used < _next_supported_version_tuple: | ||
| warnings.warn( | ||
| f"Package {_package_label} depends on " | ||
| + f"{_dependency_package}, currently installed at version " | ||
| + f"{_version_used_string}. Future updates to " | ||
| + f"{_package_label} will require {_dependency_package} at " | ||
| + f"version {_next_supported_version} or higher{_recommendation}." | ||
| + " Please ensure " | ||
| + "that either (a) your Python environment doesn't pin the " | ||
| + f"version of {_dependency_package}, so that updates to " | ||
| + f"{_package_label} can require the higher version, or " | ||
| + "(b) you manually update your Python environment to use at " | ||
| + f"least version {_next_supported_version} of " | ||
| + f"{_dependency_package}.", | ||
| FutureWarning, | ||
| ) | ||
| except Exception: | ||
| warnings.warn( | ||
| "Could not determine the version of Python " | ||
| + "currently being used. To continue receiving " | ||
| + "updates for {_package_label}, ensure you are " | ||
| + "using a supported version of Python; see " | ||
| + "https://devguide.python.org/versions/" | ||
| ) | ||
|
|
||
| __all__ = ( | ||
| "MapManagementAsyncClient", | ||
| "CreateMapConfigRequest", | ||
| "CreateMapContextConfigRequest", | ||
| "CreateStyleConfigRequest", | ||
| "DeleteMapConfigRequest", | ||
| "DeleteMapContextConfigRequest", | ||
| "DeleteStyleConfigRequest", | ||
| "GetMapConfigRequest", | ||
| "GetMapContextConfigRequest", | ||
| "GetStyleConfigRequest", | ||
| "ListMapConfigsRequest", | ||
| "ListMapConfigsResponse", | ||
| "ListMapContextConfigsRequest", | ||
| "ListMapContextConfigsResponse", | ||
| "ListStyleConfigsRequest", | ||
| "ListStyleConfigsResponse", | ||
| "MapConfig", | ||
| "MapContextConfig", | ||
| "MapFeatures", | ||
| "MapManagementClient", | ||
| "MapRenderingType", | ||
| "StyleConfig", | ||
| "StyleConfigView", | ||
| "UpdateMapConfigRequest", | ||
| "UpdateMapContextConfigRequest", | ||
| "UpdateStyleConfigRequest", | ||
| ) | ||
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThe __all__ list in a Python module should be alphabetically sorted to improve readability and maintainability.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.