Skip to content

Examples#

Index > LocationServiceRoutesV2 > Examples

Auto-generated documentation for LocationServiceRoutesV2 type annotations stubs module types-boto3-geo-routes.

Client#

Implicit type annotations#

Can be used with types-boto3[geo-routes] package installed.

Write your LocationServiceRoutesV2 code as usual, type checking and code completion should work out of the box.

Client method usage example#

# LocationServiceRoutesV2Client usage example

from boto3.session import Session


session = Session()

client = session.client("geo-routes")  # (1)
result = client.calculate_isolines()  # (2)
  1. client: LocationServiceRoutesV2Client
  2. result: CalculateIsolinesResponseTypeDef

Explicit type annotations#

With types-boto3-lite[geo-routes] or a standalone types_boto3_geo_routes package, you have to explicitly specify client: LocationServiceRoutesV2Client type annotation.

All other type annotations are optional, as types should be discovered automatically. However, these type annotations can be helpful in your functions and methods.

Client method usage example#

# LocationServiceRoutesV2Client usage example with type annotations

from boto3.session import Session

from types_boto3_geo_routes.client import LocationServiceRoutesV2Client
from types_boto3_geo_routes.type_defs import CalculateIsolinesResponseTypeDef
from types_boto3_geo_routes.type_defs import CalculateIsolinesRequestTypeDef


session = Session()

client: LocationServiceRoutesV2Client = session.client("geo-routes")

kwargs: CalculateIsolinesRequestTypeDef = {...}
result: CalculateIsolinesResponseTypeDef = client.calculate_isolines(**kwargs)