{"id":3585,"library":"mypy-boto3-geo-maps","title":"mypy-boto3-geo-maps","description":"mypy-boto3-geo-maps provides type annotations for the `boto3` AWS LocationServiceMapsV2 service. It enhances development with static type checking, autocompletion, and improved code readability for `boto3` users. The library is actively maintained with frequent updates, aligning with `boto3` releases and the `mypy-boto3-builder`'s development cadence.","status":"active","version":"1.42.84","language":"python","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","aws","types","mypy","typing","stubs","geo-maps","location-service"],"install":[{"cmd":"pip install mypy-boto3-geo-maps boto3","lang":"bash","label":"Install with boto3"},{"cmd":"pip install 'boto3-stubs[geo-maps]' boto3","lang":"bash","label":"Install via boto3-stubs extras (recommended)"}],"dependencies":[{"reason":"This package provides type stubs for boto3's LocationServiceMapsV2. boto3 itself is required for runtime functionality, though not a direct installation dependency of the stub package.","package":"boto3","optional":false},{"reason":"May be required for older Python versions for certain typing features, though recent builder versions handle this dynamically.","package":"typing-extensions","optional":true}],"imports":[{"note":"Import the client type from `mypy_boto3_geo_maps` for static type checking. The actual runtime client is created via `boto3.client('geo-maps')`.","wrong":"from boto3.client import LocationServiceMapsV2Client","symbol":"LocationServiceMapsV2Client","correct":"from mypy_boto3_geo_maps.client import LocationServiceMapsV2Client"},{"note":"Type definitions for service requests and responses are located in the `type_defs` submodule.","symbol":"CreateMapRequestRequestTypeDef","correct":"from mypy_boto3_geo_maps.type_defs import CreateMapRequestRequestTypeDef"}],"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from mypy_boto3_geo_maps.client import LocationServiceMapsV2Client\n    from mypy_boto3_geo_maps.type_defs import CreateMapRequestRequestTypeDef\n\n# Get a typed client for AWS Location Service (Maps V2)\nclient: 'LocationServiceMapsV2Client' = boto3.client(\"geo-maps\")\n\n# Example usage with a typed request (for illustration, not runnable without AWS creds)\ntry:\n    # Define a request payload using TypeDef\n    create_map_request: CreateMapRequestRequestTypeDef = {\n        \"MapName\": \"MyTestMap\",\n        \"Configuration\": {\"Style\": \"VectorEsriStreets\"},\n        \"Description\": \"A test map created via mypy-boto3-geo-maps\",\n    }\n\n    # The actual API call (will raise ClientError without valid AWS setup)\n    response = client.create_map(**create_map_request)\n    print(f\"Successfully initiated map creation: {response['MapArn']}\")\n\nexcept client.exceptions.ConflictException as e:\n    print(f\"Map already exists: {e}\")\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n\n# Example of getting a static map (assuming a map exists and permissions are set)\n# This call would require valid map name and API key if used publicly\n# response = client.get_static_map(\n#     MapName=\"MyTestMap\",\n#     CenterX=-77.0369,\n#     CenterY=38.9072,\n#     Zoom=12,\n#     Width=400,\n#     Height=300\n# )\n# print(f\"Received static map data: {len(response['ImageData'])} bytes\")\n","lang":"python","description":"This quickstart demonstrates how to obtain a type-hinted `LocationServiceMapsV2Client` and construct a typed request using `TypeDef`s provided by `mypy-boto3-geo-maps`. The `TYPE_CHECKING` block ensures that these imports are only used by type checkers, avoiding runtime dependencies. Replace placeholder values and ensure AWS credentials are configured for actual execution."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or a newer supported version.","message":"Support for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0 (which generated `mypy-boto3-geo-maps 1.42.84`). Projects using Python 3.8 will need to upgrade to Python 3.9 or newer.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.12.0 (mypy-boto3-geo-maps >=1.42.84)"},{"fix":"Review your code for explicitly imported TypeDefs and update their names according to the new convention. Consult the `mypy-boto3-builder` changelog for specific renaming patterns.","message":"Breaking changes in `mypy-boto3-builder` 8.9.0 introduced shorter names for TypeDefs for packed method arguments (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). This affects explicit imports of such TypeDefs.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.9.0"},{"fix":"Ensure `mypy` is up-to-date. No specific action is usually required, as `mypy` should automatically discover PEP 561 compliant packages. If issues persist, check `mypy`'s `installed-packages` documentation.","message":"As of `mypy-boto3-builder` 8.12.0, all `mypy-boto3` packages (including `mypy-boto3-geo-maps`) are PEP 561 compliant. This generally simplifies `mypy`'s ability to find stubs, but if you had a custom or non-standard `mypy` setup for older versions, you might need to ensure your `mypy` configuration is up-to-date.","severity":"gotcha","affected_versions":"mypy-boto3-builder >=8.12.0"},{"fix":"Wrap `mypy-boto3-geo-maps` imports in `if TYPE_CHECKING:` blocks and define runtime fallbacks (e.g., `Client = object`) for `pylint` compatibility. This prevents `mypy-boto3-geo-maps` from being a runtime dependency.","message":"When using `pylint`, it may report 'undefined variables' for type-hinted clients or TypeDefs, especially if `mypy-boto3` packages are not in `install_requires` for production builds. Using a `TYPE_CHECKING` guard can mitigate this.","severity":"gotcha","affected_versions":"All versions when using pylint"}],"env_vars":null,"search_vec":"'activ':38 'align':43 'annot':13 'autocomplet':27 'aw':17,57 'boto3':3,8,16,33,45,51,56 'builder':52 'cadenc':55 'check':26 'code':30 'develop':22,54 'enhanc':21 'frequent':41 'geo':4,9,63 'geo-map':62 'improv':29 'librari':36 'locat':66 'location-servic':65 'locationservicemapsv2':18 'maintain':39 'map':5,10,64 'mypi':2,7,50,59 'mypy-boto3-builder':49 'mypy-boto3-geo-maps':1,6 'provid':11 'readabl':31 'releas':46 'servic':19,67 'static':24 'stub':61 'type':12,25,58,60 'updat':42 'user':34","created_at":"2026-04-11T17:35:55.416564+00:00","updated_at":"2026-04-16T16:57:27.680489+00:00","problems":{"verify_error":"error: Failed to parse: `mypy-boto3-geo-maps boto3`\n  Caused by: Expected one of `@`, `(`, `<`, `=`, `>`, `~`, `!`, `;`, found `b`\nmypy-boto3-geo-maps boto3\n                    ^"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.43.73","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/youtype/mypy_boto3_builder","docs":"https://youtype.github.io/boto3_stubs_docs/mypy_boto3_geo_maps/","changelog":null,"pypi":"https://pypi.org/project/mypy-boto3-geo-maps/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs","aws"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-29","next_check":"2026-07-05","install_tag":null}}