Examples#
Index > PartnerCentralChannelAPI > Examples
Auto-generated documentation for PartnerCentralChannelAPI type annotations stubs module types-boto3-partnercentral-channel.
Client#
Implicit type annotations#
Can be used with types-boto3[partnercentral-channel] package installed.
Write your PartnerCentralChannelAPI code as usual,
type checking and code completion should work out of the box.
Client method usage example#
# PartnerCentralChannelAPIClient usage example
from boto3.session import Session
session = Session()
client = session.client("partnercentral-channel") # (1)
result = client.accept_channel_handshake() # (2)
- client: PartnerCentralChannelAPIClient
- result: AcceptChannelHandshakeResponseTypeDef
Paginator usage example#
# ListChannelHandshakesPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("partnercentral-channel") # (1)
paginator = client.get_paginator("list_channel_handshakes") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: PartnerCentralChannelAPIClient
- paginator: ListChannelHandshakesPaginator
- item: ListChannelHandshakesResponseTypeDef
Explicit type annotations#
With types-boto3-lite[partnercentral-channel]
or a standalone types_boto3_partnercentral_channel package, you have to explicitly specify client: PartnerCentralChannelAPIClient 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#
# PartnerCentralChannelAPIClient usage example with type annotations
from boto3.session import Session
from types_boto3_partnercentral_channel.client import PartnerCentralChannelAPIClient
from types_boto3_partnercentral_channel.type_defs import AcceptChannelHandshakeResponseTypeDef
from types_boto3_partnercentral_channel.type_defs import AcceptChannelHandshakeRequestTypeDef
session = Session()
client: PartnerCentralChannelAPIClient = session.client("partnercentral-channel")
kwargs: AcceptChannelHandshakeRequestTypeDef = {...}
result: AcceptChannelHandshakeResponseTypeDef = client.accept_channel_handshake(**kwargs)
Paginator usage example#
# ListChannelHandshakesPaginator usage example with type annotations
from boto3.session import Session
from types_boto3_partnercentral_channel.client import PartnerCentralChannelAPIClient
from types_boto3_partnercentral_channel.paginator import ListChannelHandshakesPaginator
from types_boto3_partnercentral_channel.type_defs import ListChannelHandshakesResponseTypeDef
session = Session()
client: PartnerCentralChannelAPIClient = session.client("partnercentral-channel")
paginator: ListChannelHandshakesPaginator = client.get_paginator("list_channel_handshakes")
for item in paginator.paginate(...):
item: ListChannelHandshakesResponseTypeDef
print(item)