Examples#
Index > Inspectorscan > Examples
Auto-generated documentation for Inspectorscan type annotations stubs module types-boto3-inspector-scan.
Client#
Implicit type annotations#
Can be used with types-boto3[inspector-scan] package installed.
Write your Inspectorscan code as usual,
type checking and code completion should work out of the box.
Client method usage example#
# InspectorscanClient usage example
from boto3.session import Session
session = Session()
client = session.client("inspector-scan") # (1)
result = client.scan_sbom() # (2)
- client: InspectorscanClient
- result: ScanSbomResponseTypeDef
Explicit type annotations#
With types-boto3-lite[inspector-scan]
or a standalone types_boto3_inspector_scan package, you have to explicitly specify client: InspectorscanClient 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#
# InspectorscanClient usage example with type annotations
from boto3.session import Session
from types_boto3_inspector_scan.client import InspectorscanClient
from types_boto3_inspector_scan.type_defs import ScanSbomResponseTypeDef
from types_boto3_inspector_scan.type_defs import ScanSbomRequestTypeDef
session = Session()
client: InspectorscanClient = session.client("inspector-scan")
kwargs: ScanSbomRequestTypeDef = {...}
result: ScanSbomResponseTypeDef = client.scan_sbom(**kwargs)