Examples#
Index > PaymentCryptographyControlPlane > Examples
Auto-generated documentation for PaymentCryptographyControlPlane type annotations stubs module types-boto3-payment-cryptography.
Client#
Implicit type annotations#
Can be used with types-boto3[payment-cryptography]
package installed.
Write your PaymentCryptographyControlPlane
code as usual,
type checking and code completion should work out of the box.
# PaymentCryptographyControlPlaneClient usage example
from boto3.session import Session
session = Session()
client = session.client("payment-cryptography") # (1)
result = client.create_alias() # (2)
- client: PaymentCryptographyControlPlaneClient
- result: CreateAliasOutputTypeDef
# ListAliasesPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("payment-cryptography") # (1)
paginator = client.get_paginator("list_aliases") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: PaymentCryptographyControlPlaneClient
- paginator: ListAliasesPaginator
- item: ListAliasesOutputTypeDef
Explicit type annotations#
With types-boto3-lite[payment-cryptography]
or a standalone types_boto3_payment_cryptography
package, you have to explicitly specify client: PaymentCryptographyControlPlaneClient
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.
# PaymentCryptographyControlPlaneClient usage example with type annotations
from boto3.session import Session
from types_boto3_payment_cryptography.client import PaymentCryptographyControlPlaneClient
from types_boto3_payment_cryptography.type_defs import CreateAliasOutputTypeDef
from types_boto3_payment_cryptography.type_defs import CreateAliasInputRequestTypeDef
session = Session()
client: PaymentCryptographyControlPlaneClient = session.client("payment-cryptography")
kwargs: CreateAliasInputRequestTypeDef = {...}
result: CreateAliasOutputTypeDef = client.create_alias(**kwargs)
# ListAliasesPaginator usage example with type annotations
from boto3.session import Session
from types_boto3_payment_cryptography.client import PaymentCryptographyControlPlaneClient
from types_boto3_payment_cryptography.paginator import ListAliasesPaginator
from types_boto3_payment_cryptography.type_defs import ListAliasesOutputTypeDef
session = Session()
client: PaymentCryptographyControlPlaneClient = session.client("payment-cryptography")
paginator: ListAliasesPaginator = client.get_paginator("list_aliases")
for item in paginator.paginate(...):
item: ListAliasesOutputTypeDef
print(item)