Examples#
Index > EntityResolution > Examples
Auto-generated documentation for EntityResolution type annotations stubs module mypy-boto3-entityresolution.
Client#
Implicit type annotations#
Can be used with boto3-stubs[entityresolution]
package installed.
Write your EntityResolution
code as usual,
type checking and code completion should work out of the box.
# EntityResolutionClient usage example
from boto3.session import Session
session = Session()
client = session.client("entityresolution") # (1)
result = client.create_id_mapping_workflow() # (2)
- client: EntityResolutionClient
- result: CreateIdMappingWorkflowOutputTypeDef
# ListIdMappingJobsPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("entityresolution") # (1)
paginator = client.get_paginator("list_id_mapping_jobs") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: EntityResolutionClient
- paginator: ListIdMappingJobsPaginator
- item: ListIdMappingJobsOutputTypeDef
Explicit type annotations#
With boto3-stubs-lite[entityresolution]
or a standalone mypy_boto3_entityresolution
package, you have to explicitly specify client: EntityResolutionClient
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.
# EntityResolutionClient usage example with type annotations
from boto3.session import Session
from mypy_boto3_entityresolution.client import EntityResolutionClient
from mypy_boto3_entityresolution.type_defs import CreateIdMappingWorkflowOutputTypeDef
from mypy_boto3_entityresolution.type_defs import CreateIdMappingWorkflowInputRequestTypeDef
session = Session()
client: EntityResolutionClient = session.client("entityresolution")
kwargs: CreateIdMappingWorkflowInputRequestTypeDef = {...}
result: CreateIdMappingWorkflowOutputTypeDef = client.create_id_mapping_workflow(**kwargs)
# ListIdMappingJobsPaginator usage example with type annotations
from boto3.session import Session
from mypy_boto3_entityresolution.client import EntityResolutionClient
from mypy_boto3_entityresolution.paginator import ListIdMappingJobsPaginator
from mypy_boto3_entityresolution.type_defs import ListIdMappingJobsOutputTypeDef
session = Session()
client: EntityResolutionClient = session.client("entityresolution")
paginator: ListIdMappingJobsPaginator = client.get_paginator("list_id_mapping_jobs")
for item in paginator.paginate(...):
item: ListIdMappingJobsOutputTypeDef
print(item)