Skip to content

Examples#

Index > DynamoDB > Examples

Auto-generated documentation for DynamoDB type annotations stubs module mypy-boto3-dynamodb.

Client#

Implicit type annotations#

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

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

# DynamoDBClient usage example

from boto3.session import Session


session = Session()

client = session.client("dynamodb")  # (1)
result = client.batch_execute_statement()  # (2)
  1. client: DynamoDBClient
  2. result: BatchExecuteStatementOutputTypeDef
# ListBackupsPaginator usage example

from boto3.session import Session


session = Session()
client = session.client("dynamodb")  # (1)

paginator = client.get_paginator("list_backups")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: DynamoDBClient
  2. paginator: ListBackupsPaginator
  3. item: