Examples#
Auto-generated documentation for DataZone type annotations stubs module types-boto3-datazone.
Client#
Implicit type annotations#
Can be used with types-boto3[datazone]
package installed.
Write your DataZone
code as usual,
type checking and code completion should work out of the box.
Client method usage example#
# DataZoneClient usage example
from boto3.session import Session
session = Session()
client = session.client("datazone") # (1)
result = client.accept_predictions() # (2)
- client: DataZoneClient
- result: AcceptPredictionsOutputTypeDef
Paginator usage example#
# ListAccountPoolsPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("datazone") # (1)
paginator = client.get_paginator("list_account_pools") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: DataZoneClient
- paginator: ListAccountPoolsPaginator
- item: ListAccountPoolsOutputTypeDef
Explicit type annotations#
With types-boto3-lite[datazone]
or a standalone types_boto3_datazone
package, you have to explicitly specify client: DataZoneClient
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#
# DataZoneClient usage example with type annotations
from boto3.session import Session
from types_boto3_datazone.client import DataZoneClient
from types_boto3_datazone.type_defs import AcceptPredictionsOutputTypeDef
from types_boto3_datazone.type_defs import AcceptPredictionsInputTypeDef
session = Session()
client: DataZoneClient = session.client("datazone")
kwargs: AcceptPredictionsInputTypeDef = {...}
result: AcceptPredictionsOutputTypeDef = client.accept_predictions(**kwargs)
Paginator usage example#
# ListAccountPoolsPaginator usage example with type annotations
from boto3.session import Session
from types_boto3_datazone.client import DataZoneClient
from types_boto3_datazone.paginator import ListAccountPoolsPaginator
from types_boto3_datazone.type_defs import ListAccountPoolsOutputTypeDef
session = Session()
client: DataZoneClient = session.client("datazone")
paginator: ListAccountPoolsPaginator = client.get_paginator("list_account_pools")
for item in paginator.paginate(...):
item: ListAccountPoolsOutputTypeDef
print(item)