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