Skip to content


Index > SupplyChain > Examples

Auto-generated documentation for SupplyChain type annotations stubs module mypy-boto3-supplychain.


Implicit type annotations#

Can be used with boto3-stubs[supplychain] package installed.

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

# SupplyChainClient usage example

from boto3.session import Session

session = Session()

client = session.client("supplychain")  # (1)
result = client.create_bill_of_materials_import_job()  # (2)
  1. client: SupplyChainClient
  2. result: CreateBillOfMaterialsImportJobResponseTypeDef

Explicit type annotations#

With boto3-stubs-lite[supplychain] or a standalone mypy_boto3_supplychain package, you have to explicitly specify client: SupplyChainClient 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.

# SupplyChainClient usage example with type annotations

from boto3.session import Session

from mypy_boto3_supplychain.client import SupplyChainClient
from mypy_boto3_supplychain.type_defs import CreateBillOfMaterialsImportJobResponseTypeDef
from mypy_boto3_supplychain.type_defs import CreateBillOfMaterialsImportJobRequestRequestTypeDef

session = Session()

client: SupplyChainClient = session.client("supplychain")

kwargs: CreateBillOfMaterialsImportJobRequestRequestTypeDef = {...}
result: CreateBillOfMaterialsImportJobResponseTypeDef = client.create_bill_of_materials_import_job(**kwargs)