Install & Compatibility
Where this runs
tested against v1.43.73 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.600s · 53.2MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 5.6s · import 0.544s · 54MB
52MB installed
● package 52MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
LocationServiceMapsV2Client
✓ from mypy_boto3_geo_maps.client import LocationServiceMapsV2Client
✗ from boto3.client import LocationServiceMapsV2Client
Import the client type from `mypy_boto3_geo_maps` for static type checking. The actual runtime client is created via `boto3.client('geo-maps')`.
CreateMapRequestRequestTypeDef
✓ from mypy_boto3_geo_maps.type_defs import CreateMapRequestRequestTypeDef
Type definitions for service requests and responses are located in the `type_defs` submodule.
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.
import boto3
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from mypy_boto3_geo_maps.client import LocationServiceMapsV2Client
from mypy_boto3_geo_maps.type_defs import CreateMapRequestRequestTypeDef
# Get a typed client for AWS Location Service (Maps V2)
client: 'LocationServiceMapsV2Client' = boto3.client("geo-maps")
# Example usage with a typed request (for illustration, not runnable without AWS creds)
try:
# Define a request payload using TypeDef
create_map_request: CreateMapRequestRequestTypeDef = {
"MapName": "MyTestMap",
"Configuration": {"Style": "VectorEsriStreets"},
"Description": "A test map created via mypy-boto3-geo-maps",
}
# The actual API call (will raise ClientError without valid AWS setup)
response = client.create_map(**create_map_request)
print(f"Successfully initiated map creation: {response['MapArn']}")
except client.exceptions.ConflictException as e:
print(f"Map already exists: {e}")
except Exception as e:
print(f"An error occurred: {e}")
# Example of getting a static map (assuming a map exists and permissions are set)
# This call would require valid map name and API key if used publicly
# response = client.get_static_map(
# MapName="MyTestMap",
# CenterX=-77.0369,
# CenterY=38.9072,
# Zoom=12,
# Width=400,
# Height=300
# )
# print(f"Received static map data: {len(response['ImageData'])} bytes")
Debug
Known issues
breakingSupport 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.fixUpgrade your Python environment to 3.9 or a newer supported version.
affects: mypy-boto3-builder >=8.12.0 (mypy-boto3-geo-maps >=1.42.84)
breakingBreaking 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.fixReview 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.
affects: mypy-boto3-builder >=8.9.0
gotchaAs 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.fixEnsure `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.
affects: mypy-boto3-builder >=8.12.0
gotchaWhen 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.fixWrap `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.
affects: All versions when using pylint
Upgrade
Version history
1.43.73latest on PyPI · released Aug 17, 2026
Audit
Dependencies
boto3requiredThis 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.
typing-extensionsoptionalMay be required for older Python versions for certain typing features, though recent builder versions handle this dynamically.