Skip to content

Examples#

Index > ARCZonalShift > Examples

Auto-generated documentation for ARCZonalShift type annotations stubs module mypy-boto3-arc-zonal-shift.

Client#

Implicit type annotations#

Can be used with boto3-stubs[arc-zonal-shift] package installed.

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

# ARCZonalShiftClient usage example

from boto3.session import Session


session = Session()

client = session.client("arc-zonal-shift")  # (1)
result = client.cancel_zonal_shift()  # (2)
  1. client: ARCZonalShiftClient
  2. result: ZonalShiftTypeDef
# ListAutoshiftsPaginator usage example

from boto3.session import Session


session = Session()
client = session.client("arc-zonal-shift")  # (1)

paginator = client.get_paginator("list_autoshifts")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: ARCZonalShiftClient
  2. paginator: ListAutoshiftsPaginator
  3. item: ListAutoshiftsResponseTypeDef

Explicit type annotations#

With boto3-stubs-lite[arc-zonal-shift] or a standalone mypy_boto3_arc_zonal_shift package, you have to explicitly specify client: ARCZonalShiftClient 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.

# ARCZonalShiftClient usage example with type annotations

from boto3.session import Session

from mypy_boto3_arc_zonal_shift.client import ARCZonalShiftClient
from mypy_boto3_arc_zonal_shift.type_defs import ZonalShiftTypeDef
from mypy_boto3_arc_zonal_shift.type_defs import CancelZonalShiftRequestRequestTypeDef


session = Session()

client: ARCZonalShiftClient = session.client("arc-zonal-shift")

kwargs: CancelZonalShiftRequestRequestTypeDef = {...}
result: ZonalShiftTypeDef = client.cancel_zonal_shift(**kwargs)
# ListAutoshiftsPaginator usage example with type annotations

from boto3.session import Session

from mypy_boto3_arc_zonal_shift.client import ARCZonalShiftClient
from mypy_boto3_arc_zonal_shift.paginator import ListAutoshiftsPaginator
from mypy_boto3_arc_zonal_shift.type_defs import ListAutoshiftsResponseTypeDef


session = Session()
client: ARCZonalShiftClient = session.client("arc-zonal-shift")

paginator: ListAutoshiftsPaginator = client.get_paginator("list_autoshifts")
for item in paginator.paginate(...):
    item: ListAutoshiftsResponseTypeDef
    print(item)