Skip to content

Examples#

Index > HealthImaging > Examples

Auto-generated documentation for HealthImaging type annotations stubs module types-boto3-medical-imaging.

Client#

Implicit type annotations#

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

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

# HealthImagingClient usage example

from boto3.session import Session


session = Session()

client = session.client("medical-imaging")  # (1)
result = client.copy_image_set()  # (2)
  1. client: HealthImagingClient
  2. result: CopyImageSetResponseTypeDef
# ListDICOMImportJobsPaginator usage example

from boto3.session import Session


session = Session()
client = session.client("medical-imaging")  # (1)

paginator = client.get_paginator("list_dicom_import_jobs")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: HealthImagingClient
  2. paginator: ListDICOMImportJobsPaginator
  3. item: ListDICOMImportJobsResponseTypeDef

Explicit type annotations#

With types-boto3-lite[medical-imaging] or a standalone types_boto3_medical_imaging package, you have to explicitly specify client: HealthImagingClient 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.

# HealthImagingClient usage example with type annotations

from boto3.session import Session

from types_boto3_medical_imaging.client import HealthImagingClient
from types_boto3_medical_imaging.type_defs import CopyImageSetResponseTypeDef
from types_boto3_medical_imaging.type_defs import CopyImageSetRequestRequestTypeDef


session = Session()

client: HealthImagingClient = session.client("medical-imaging")

kwargs: CopyImageSetRequestRequestTypeDef = {...}
result: CopyImageSetResponseTypeDef = client.copy_image_set(**kwargs)
# ListDICOMImportJobsPaginator usage example with type annotations

from boto3.session import Session

from types_boto3_medical_imaging.client import HealthImagingClient
from types_boto3_medical_imaging.paginator import ListDICOMImportJobsPaginator
from types_boto3_medical_imaging.type_defs import ListDICOMImportJobsResponseTypeDef


session = Session()
client: HealthImagingClient = session.client("medical-imaging")

paginator: ListDICOMImportJobsPaginator = client.get_paginator("list_dicom_import_jobs")
for item in paginator.paginate(...):
    item: ListDICOMImportJobsResponseTypeDef
    print(item)