Examples#
Index > ComprehendMedical > Examples
Auto-generated documentation for ComprehendMedical type annotations stubs module mypy-boto3-comprehendmedical.
Client#
Implicit type annotations#
Can be used with boto3-stubs[comprehendmedical]
package installed.
Write your ComprehendMedical
code as usual,
type checking and code completion should work out of the box.
# ComprehendMedicalClient usage example
from boto3.session import Session
session = Session()
client = session.client("comprehendmedical") # (1)
result = client.describe_entities_detection_v2_job() # (2)
- client: ComprehendMedicalClient
- result: DescribeEntitiesDetectionV2JobResponseTypeDef
Explicit type annotations#
With boto3-stubs-lite[comprehendmedical]
or a standalone mypy_boto3_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 boto3.session import Session
from mypy_boto3_comprehendmedical.client import ComprehendMedicalClient
from mypy_boto3_comprehendmedical.type_defs import DescribeEntitiesDetectionV2JobResponseTypeDef
from mypy_boto3_comprehendmedical.type_defs import DescribeEntitiesDetectionV2JobRequestRequestTypeDef
session = Session()
client: ComprehendMedicalClient = session.client("comprehendmedical")
kwargs: DescribeEntitiesDetectionV2JobRequestRequestTypeDef = {...}
result: DescribeEntitiesDetectionV2JobResponseTypeDef = client.describe_entities_detection_v2_job(**kwargs)