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