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