Examples#
Index > HealthLake > Examples
Auto-generated documentation for HealthLake type annotations stubs module types-boto3-healthlake.
Client#
Implicit type annotations#
Can be used with types-boto3[healthlake] package installed.
Write your HealthLake code as usual,
type checking and code completion should work out of the box.
Client method usage example#
# HealthLakeClient usage example
from boto3.session import Session
session = Session()
client = session.client("healthlake") # (1)
result = client.create_data_transformation_profile() # (2)
- client: HealthLakeClient
- result: CreateDataTransformationProfileResponseTypeDef
Paginator usage example#
# ListDataTransformationJobsPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("healthlake") # (1)
paginator = client.get_paginator("list_data_transformation_jobs") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: HealthLakeClient
- paginator: ListDataTransformationJobsPaginator
- item: ListDataTransformationJobsResponseTypeDef
Waiter usage example#
# DataTransformationJobCompletedWaiter usage example
from boto3.session import Session
session = Session()
client = session.client("healthlake") # (1)
waiter = client.get_waiter("data_transformation_job_completed") # (2)
waiter.wait(...)
- client: HealthLakeClient
- waiter: DataTransformationJobCompletedWaiter
Explicit type annotations#
With types-boto3-lite[healthlake]
or a standalone types_boto3_healthlake package, you have to explicitly specify client: HealthLakeClient 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#
# HealthLakeClient usage example with type annotations
from boto3.session import Session
from types_boto3_healthlake.client import HealthLakeClient
from types_boto3_healthlake.type_defs import CreateDataTransformationProfileResponseTypeDef
from types_boto3_healthlake.type_defs import CreateDataTransformationProfileRequestTypeDef
session = Session()
client: HealthLakeClient = session.client("healthlake")
kwargs: CreateDataTransformationProfileRequestTypeDef = {...}
result: CreateDataTransformationProfileResponseTypeDef = client.create_data_transformation_profile(**kwargs)
Paginator usage example#
# ListDataTransformationJobsPaginator usage example with type annotations
from boto3.session import Session
from types_boto3_healthlake.client import HealthLakeClient
from types_boto3_healthlake.paginator import ListDataTransformationJobsPaginator
from types_boto3_healthlake.type_defs import ListDataTransformationJobsResponseTypeDef
session = Session()
client: HealthLakeClient = session.client("healthlake")
paginator: ListDataTransformationJobsPaginator = client.get_paginator("list_data_transformation_jobs")
for item in paginator.paginate(...):
item: ListDataTransformationJobsResponseTypeDef
print(item)
Waiter usage example#
# DataTransformationJobCompletedWaiter usage example with type annotations
from boto3.session import Session
from types_boto3_healthlake.client import HealthLakeClient
from types_boto3_healthlake.waiter import DataTransformationJobCompletedWaiter
session = Session()
client: HealthLakeClient = session.client("healthlake")
waiter: DataTransformationJobCompletedWaiter = client.get_waiter("data_transformation_job_completed")
waiter.wait(...)