Skip to content

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.add_policy_statement()  # (2)
  1. client: EntityResolutionClient
  2. result: AddPolicyStatementOutputTypeDef
# 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)
  1. client: EntityResolutionClient
  2. paginator: ListIdMappingJobsPaginator
  3. 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 AddPolicyStatementOutputTypeDef
from mypy_boto3_entityresolution.type_defs import AddPolicyStatementInputRequestTypeDef


session = Session()

client: EntityResolutionClient = session.client("entityresolution")

kwargs: AddPolicyStatementInputRequestTypeDef = {...}
result: AddPolicyStatementOutputTypeDef = client.add_policy_statement(**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)