Examples#
Index > inspectorscan > Examples
Auto-generated documentation for inspectorscan type annotations stubs module types-aiobotocore-inspector-scan.
Client#
Implicit type annotations#
Can be used with types-aioboto3[inspector-scan]
package installed.
Write your inspectorscan
code as usual,
type checking and code completion should work out of the box.
# inspectorscanClient usage example
from aioboto3.session import Session
session = Session()
async with session.client("inspector-scan") as client: # (1)
result = await client.scan_sbom() # (2)
- client: inspectorscanClient
- result: ScanSbomResponseTypeDef
Explicit type annotations#
With types-aioboto3-lite[inspector-scan]
or a standalone types_aiobotocore_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.
# inspectorscanClient usage example with type annotations
from aioboto3.session import Session
from types_aiobotocore_inspector_scan.client import inspectorscanClient
from types_aiobotocore_inspector_scan.type_defs import ScanSbomResponseTypeDef
from types_aiobotocore_inspector_scan.type_defs import ScanSbomRequestRequestTypeDef
session = Session()
client: inspectorscanClient
async with session.client("inspector-scan") as client: # (1)
kwargs: ScanSbomRequestRequestTypeDef = {...} # (2)
result: ScanSbomResponseTypeDef = await client.scan_sbom(**kwargs) # (3)
- client: inspectorscanClient
- kwargs: ScanSbomRequestRequestTypeDef
- result: ScanSbomResponseTypeDef