Skip to content

Examples#

Index > PartnerCentralSellingAPI > Examples

Auto-generated documentation for PartnerCentralSellingAPI type annotations stubs module mypy-boto3-partnercentral-selling.

Client#

Implicit type annotations#

Can be used with boto3-stubs[partnercentral-selling] package installed.

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

# PartnerCentralSellingAPIClient usage example

from boto3.session import Session


session = Session()

client = session.client("partnercentral-selling")  # (1)
result = client.accept_engagement_invitation()  # (2)
  1. client: PartnerCentralSellingAPIClient
  2. result: EmptyResponseMetadataTypeDef
# ListEngagementByAcceptingInvitationTasksPaginator usage example

from boto3.session import Session


session = Session()
client = session.client("partnercentral-selling")  # (1)

paginator = client.get_paginator("list_engagement_by_accepting_invitation_tasks")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: PartnerCentralSellingAPIClient
  2. paginator: ListEngagementByAcceptingInvitationTasksPaginator
  3. item: ListEngagementByAcceptingInvitationTasksResponseTypeDef

Explicit type annotations#

With boto3-stubs-lite[partnercentral-selling] or a standalone mypy_boto3_partnercentral_selling package, you have to explicitly specify client: PartnerCentralSellingAPIClient 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.

# PartnerCentralSellingAPIClient usage example with type annotations

from boto3.session import Session

from mypy_boto3_partnercentral_selling.client import PartnerCentralSellingAPIClient
from mypy_boto3_partnercentral_selling.type_defs import EmptyResponseMetadataTypeDef
from mypy_boto3_partnercentral_selling.type_defs import AcceptEngagementInvitationRequestRequestTypeDef


session = Session()

client: PartnerCentralSellingAPIClient = session.client("partnercentral-selling")

kwargs: AcceptEngagementInvitationRequestRequestTypeDef = {...}
result: EmptyResponseMetadataTypeDef = client.accept_engagement_invitation(**kwargs)
# ListEngagementByAcceptingInvitationTasksPaginator usage example with type annotations

from boto3.session import Session

from mypy_boto3_partnercentral_selling.client import PartnerCentralSellingAPIClient
from mypy_boto3_partnercentral_selling.paginator import ListEngagementByAcceptingInvitationTasksPaginator
from mypy_boto3_partnercentral_selling.type_defs import ListEngagementByAcceptingInvitationTasksResponseTypeDef


session = Session()
client: PartnerCentralSellingAPIClient = session.client("partnercentral-selling")

paginator: ListEngagementByAcceptingInvitationTasksPaginator = client.get_paginator("list_engagement_by_accepting_invitation_tasks")
for item in paginator.paginate(...):
    item: ListEngagementByAcceptingInvitationTasksResponseTypeDef
    print(item)