Install & Compatibility
Where this runs
tested against v1.43.43 · 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.95 runs
installs and imports cleanly · install 0.0s · import 0.604s · 51.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.8s · import 0.580s · 52MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
LocationServicePlacesV2Client
✓ from mypy_boto3_geo_places.client import LocationServicePlacesV2Client
SearchPlaceIndexForTextResponseTypeDef
✓ from mypy_boto3_geo_places.type_defs import SearchPlaceIndexForTextResponseTypeDef
Type definitions for API responses are available in the `type_defs` submodule.
PlacesIndexNameType
✓ from mypy_boto3_geo_places.literals import PlacesIndexNameType
Literals for service-specific enumerations are available in the `literals` submodule.
This quickstart demonstrates how to use `mypy-boto3-geo-places` to type-hint a `boto3` Location Service Places V2 client and its API responses. The `TYPE_CHECKING` block ensures that the type imports are only active during static analysis, avoiding runtime dependencies. Remember that `boto3` itself needs to be configured with AWS credentials to make actual API calls.
import boto3
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from mypy_boto3_geo_places.client import LocationServicePlacesV2Client
from mypy_boto3_geo_places.type_defs import SearchPlaceIndexForTextResponseTypeDef
def search_places(index_name: str, text: str) -> SearchPlaceIndexForTextResponseTypeDef:
client: LocationServicePlacesV2Client = boto3.client("geo-places", region_name="us-east-1")
response: SearchPlaceIndexForTextResponseTypeDef = client.search_place_index_for_text(
IndexName=index_name,
Text=text
)
return response
# Example usage (will not run without actual AWS credentials and an index)
if __name__ == "__main__":
# Replace with your actual index name
my_index = "YOUR_PLACE_INDEX_NAME"
search_query = "coffee shop in New York"
try:
# Mock environment variables for demonstration, replace with actual if running
import os
os.environ['AWS_ACCESS_KEY_ID'] = os.environ.get('AWS_ACCESS_KEY_ID', 'DUMMY_KEY')
os.environ['AWS_SECRET_ACCESS_KEY'] = os.environ.get('AWS_SECRET_ACCESS_KEY', 'DUMMY_SECRET')
result = search_places(my_index, search_query)
print(f"Found {len(result['Results'])} places.")
for place in result['Results']:
print(f" Place: {place['Place']['Label']}")
except Exception as e:
print(f"An error occurred (expected without proper AWS setup): {e}")
Debug
Known issues
breakingSupport for Python 3.8 has been removed in `mypy-boto3-builder` version 8.12.0 and subsequently for all generated `mypy-boto3` packages. Users must upgrade to Python 3.9 or newer.fixUpgrade your Python environment to 3.9 or higher. Update `boto3` and `mypy-boto3-geo-places` accordingly.
affects: mypy-boto3-builder >= 8.12.0
breakingTypeDef naming conventions were changed in `mypy-boto3-builder` 8.9.0. Some TypeDefs for packed method arguments now use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). Conflicting `Extra` postfixes were also moved to the end.fixReview your imports and usage of explicitly typed `TypeDef` objects. Update their names to reflect the new conventions if affected. This is less likely to affect `geo-places` directly but is a general builder change.
affects: mypy-boto3-builder >= 8.9.0
gotchaThis package provides only type stubs and does not include the `boto3` runtime library. `boto3` must be installed separately to enable actual AWS API interactions.fixEnsure `boto3` is installed in your environment: `pip install boto3`.
affects: All
gotchaFor optimal autocompletion and type checking in IDEs like VSCode, explicit type annotations for `boto3.client()` and `boto3.resource()` calls are often recommended, especially if the IDE's Python extension does not fully support function overloads.fixExplicitly type-hint your `boto3` clients/resources as shown in the quickstart (e.g., `client: LocationServicePlacesV2Client = boto3.client("geo-places")`). affects: All
gotchaWhen using `mypy-boto3` packages with PyCharm, you might encounter slow performance or high CPU usage due to `Literal` overloads. It is recommended to try `boto3-stubs-lite` or disable PyCharm's internal type checker and use `mypy` or `pyright` instead.fixConsider installing `boto3-stubs-lite` if you experience performance issues in PyCharm (`pip install boto3-stubs-lite`). Alternatively, rely on external type checkers like `mypy` or `pyright`.
affects: All
Upgrade
Version history
1.43.43latest on PyPI · released Jul 8, 2026
Audit
Dependencies
boto3requiredRuntime library for which these are type stubs.