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