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