Examples#
Index > PartnerCentralSellingAPI > Examples
Auto-generated documentation for PartnerCentralSellingAPI type annotations stubs module types-boto3-partnercentral-selling.
Client#
Implicit type annotations#
Can be used with types-boto3[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)
- client: PartnerCentralSellingAPIClient
- 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)
- client: PartnerCentralSellingAPIClient
- paginator: ListEngagementByAcceptingInvitationTasksPaginator
- item: ListEngagementByAcceptingInvitationTasksResponseTypeDef
Explicit type annotations#
With types-boto3-lite[partnercentral-selling]
or a standalone types_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 types_boto3_partnercentral_selling.client import PartnerCentralSellingAPIClient
from types_boto3_partnercentral_selling.type_defs import EmptyResponseMetadataTypeDef
from types_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 types_boto3_partnercentral_selling.client import PartnerCentralSellingAPIClient
from types_boto3_partnercentral_selling.paginator import ListEngagementByAcceptingInvitationTasksPaginator
from types_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)