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