Skip to content

Examples#

Index > UserExperienceCustomization > Examples

Auto-generated documentation for UserExperienceCustomization type annotations stubs module types-boto3-uxc.

Client#

Implicit type annotations#

Can be used with types-boto3[uxc] package installed.

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

Client method usage example#

# UserExperienceCustomizationClient usage example

from boto3.session import Session


session = Session()

client = session.client("uxc")  # (1)
result = client.list_services()  # (2)
  1. client: UserExperienceCustomizationClient
  2. result: ListServicesOutputTypeDef

Paginator usage example#

# ListServicesPaginator usage example

from boto3.session import Session


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

paginator = client.get_paginator("list_services")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: UserExperienceCustomizationClient
  2. paginator: ListServicesPaginator
  3. item: ListServicesOutputTypeDef

Explicit type annotations#

With types-boto3-lite[uxc] or a standalone types_boto3_uxc package, you have to explicitly specify client: UserExperienceCustomizationClient 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#

# UserExperienceCustomizationClient usage example with type annotations

from boto3.session import Session

from types_boto3_uxc.client import UserExperienceCustomizationClient
from types_boto3_uxc.type_defs import ListServicesOutputTypeDef
from types_boto3_uxc.type_defs import ListServicesInputTypeDef


session = Session()

client: UserExperienceCustomizationClient = session.client("uxc")

kwargs: ListServicesInputTypeDef = {...}
result: ListServicesOutputTypeDef = client.list_services(**kwargs)

Paginator usage example#

# ListServicesPaginator usage example with type annotations

from boto3.session import Session

from types_boto3_uxc.client import UserExperienceCustomizationClient
from types_boto3_uxc.paginator import ListServicesPaginator
from types_boto3_uxc.type_defs import ListServicesOutputTypeDef


session = Session()
client: UserExperienceCustomizationClient = session.client("uxc")

paginator: ListServicesPaginator = client.get_paginator("list_services")
for item in paginator.paginate(...):
    item: ListServicesOutputTypeDef
    print(item)