Skip to content

Examples#

Index > ComprehendMedical > Examples

Auto-generated documentation for ComprehendMedical type annotations stubs module types-aiobotocore-comprehendmedical.

Client#

Implicit type annotations#

Can be used with types-aiobotocore[comprehendmedical] package installed.

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

# ComprehendMedicalClient usage example

from aiobotocore.session import get_session


session = get_session()

async with session.create_client("comprehendmedical") as client:  # (1)
    result = await client.describe_entities_detection_v2_job()  # (2)
  1. client: ComprehendMedicalClient
  2. result: DescribeEntitiesDetectionV2JobResponseTypeDef

Explicit type annotations#

With types-aiobotocore-lite[comprehendmedical] or a standalone types_aiobotocore_comprehendmedical package, you have to explicitly specify client: ComprehendMedicalClient 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.

# ComprehendMedicalClient usage example with type annotations

from aiobotocore.session import get_session

from types_aiobotocore_comprehendmedical.client import ComprehendMedicalClient
from types_aiobotocore_comprehendmedical.type_defs import DescribeEntitiesDetectionV2JobResponseTypeDef
from types_aiobotocore_comprehendmedical.type_defs import DescribeEntitiesDetectionV2JobRequestRequestTypeDef


session = get_session()

async with session.create_client("comprehendmedical") as client:
    client: ComprehendMedicalClient
    kwargs: DescribeEntitiesDetectionV2JobRequestRequestTypeDef = {...}
    result: DescribeEntitiesDetectionV2JobResponseTypeDef = await client.describe_entities_detection_v2_job(**kwargs)