Skip to content

Examples#

Index > AmplifyUIBuilder > Examples

Auto-generated documentation for AmplifyUIBuilder type annotations stubs module mypy-boto3-amplifyuibuilder.

Client#

Implicit type annotations#

Can be used with boto3-stubs[amplifyuibuilder] package installed.

Write your AmplifyUIBuilder code as usual, type checking and code completion should work out of the box.

Client method usage example#

# AmplifyUIBuilderClient usage example

from boto3.session import Session


session = Session()

client = session.client("amplifyuibuilder")  # (1)
result = client.create_component()  # (2)
  1. client: AmplifyUIBuilderClient
  2. result: CreateComponentResponseTypeDef

Paginator usage example#

# ExportComponentsPaginator usage example

from boto3.session import Session


session = Session()
client = session.client("amplifyuibuilder")  # (1)

paginator = client.get_paginator("export_components")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: AmplifyUIBuilderClient
  2. paginator: ExportComponentsPaginator
  3. item: ExportComponentsResponseTypeDef

Explicit type annotations#

With boto3-stubs-lite[amplifyuibuilder] or a standalone mypy_boto3_amplifyuibuilder package, you have to explicitly specify client: AmplifyUIBuilderClient 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#

# AmplifyUIBuilderClient usage example with type annotations

from boto3.session import Session

from mypy_boto3_amplifyuibuilder.client import AmplifyUIBuilderClient
from mypy_boto3_amplifyuibuilder.type_defs import CreateComponentResponseTypeDef
from mypy_boto3_amplifyuibuilder.type_defs import CreateComponentRequestTypeDef


session = Session()

client: AmplifyUIBuilderClient = session.client("amplifyuibuilder")

kwargs: CreateComponentRequestTypeDef = {...}
result: CreateComponentResponseTypeDef = client.create_component(**kwargs)

Paginator usage example#

# ExportComponentsPaginator usage example with type annotations

from boto3.session import Session

from mypy_boto3_amplifyuibuilder.client import AmplifyUIBuilderClient
from mypy_boto3_amplifyuibuilder.paginator import ExportComponentsPaginator
from mypy_boto3_amplifyuibuilder.type_defs import ExportComponentsResponseTypeDef


session = Session()
client: AmplifyUIBuilderClient = session.client("amplifyuibuilder")

paginator: ExportComponentsPaginator = client.get_paginator("export_components")
for item in paginator.paginate(...):
    item: ExportComponentsResponseTypeDef
    print(item)