Skip to content

Examples#

Index > MarketplaceDeploymentService > Examples

Auto-generated documentation for MarketplaceDeploymentService type annotations stubs module mypy-boto3-marketplace-deployment.

Client#

Implicit type annotations#

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

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

# MarketplaceDeploymentServiceClient usage example

from boto3.session import Session


session = Session()

client = session.client("marketplace-deployment")  # (1)
result = client.list_tags_for_resource()  # (2)
  1. client: MarketplaceDeploymentServiceClient
  2. result: ListTagsForResourceResponseTypeDef

Explicit type annotations#

With boto3-stubs-lite[marketplace-deployment] or a standalone mypy_boto3_marketplace_deployment package, you have to explicitly specify client: MarketplaceDeploymentServiceClient 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.

# MarketplaceDeploymentServiceClient usage example with type annotations

from boto3.session import Session

from mypy_boto3_marketplace_deployment.client import MarketplaceDeploymentServiceClient
from mypy_boto3_marketplace_deployment.type_defs import ListTagsForResourceResponseTypeDef
from mypy_boto3_marketplace_deployment.type_defs import ListTagsForResourceRequestRequestTypeDef


session = Session()

client: MarketplaceDeploymentServiceClient = session.client("marketplace-deployment")

kwargs: ListTagsForResourceRequestRequestTypeDef = {...}
result: ListTagsForResourceResponseTypeDef = client.list_tags_for_resource(**kwargs)