Skip to content

Examples#

Index > DynamoDBStreams > Examples

Auto-generated documentation for DynamoDBStreams type annotations stubs module types-aiobotocore-dynamodbstreams.

Client#

Implicit type annotations#

Can be used with types-aiobotocore[dynamodbstreams] package installed.

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

# DynamoDBStreamsClient usage example

from aiobotocore.session import get_session


session = get_session()

async with session.create_client("dynamodbstreams") as client:  # (1)
    result = await client.describe_stream()  # (2)
  1. client: DynamoDBStreamsClient
  2. result: DescribeStreamOutputTypeDef

Explicit type annotations#

With types-aiobotocore-lite[dynamodbstreams] or a standalone types_aiobotocore_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 aiobotocore.session import get_session

from types_aiobotocore_dynamodbstreams.client import DynamoDBStreamsClient
from types_aiobotocore_dynamodbstreams.type_defs import DescribeStreamOutputTypeDef
from types_aiobotocore_dynamodbstreams.type_defs import DescribeStreamInputRequestTypeDef


session = get_session()

async with session.create_client("dynamodbstreams") as client:
    client: DynamoDBStreamsClient
    kwargs: DescribeStreamInputRequestTypeDef = {...}
    result: DescribeStreamOutputTypeDef = await client.describe_stream(**kwargs)