Skip to content

DynamoDB module#

Index > DynamoDB

Auto-generated documentation for DynamoDB type annotations stubs module types-aiobotocore-dynamodb.

How to install#

You can generate type annotations for aiobotocore package locally with mypy-boto3-builder. Use uv for build isolation.

  1. Run mypy-boto3-builder in your package root directory: uvx --with 'aiobotocore==2.23.0' mypy-boto3-builder
  2. Select aiobotocore AWS SDK.
  3. Add DynamoDB service.
  4. Use provided commands to install generated packages.

From PyPI with pip#

Install types-aiobotocore for DynamoDB service.

# install with aiobotocore type annotations
python -m pip install 'types-aiobotocore[dynamodb]'

# Lite version does not provide session.client/resource overloads
# it is more RAM-friendly, but requires explicit type annotations
python -m pip install 'types-aiobotocore-lite[dynamodb]'

# standalone installation
python -m pip install types-aiobotocore-dynamodb

How to uninstall#

python -m pip uninstall -y types-aiobotocore-dynamodb

Usage#

Code samples can be found in Examples.

DynamoDBClient#

Type annotations and code completion for session.create_client("dynamodb") as DynamoDBClient boto3 documentation

# DynamoDBClient usage example

from aiobotocore.session import get_session

from types_aiobotocore_dynamodb.client import DynamoDBClient


session = get_session()
async with session.create_client("dynamodb") as client:
    client: DynamoDBClient

Paginators#

Type annotations and code completion for paginators from session.create_client("dynamodb").get_paginator("...").

# ListBackupsPaginator usage example

from types_aiobotocore_dynamodb.paginator import ListBackupsPaginator

def get_list_backups_paginator() -> ListBackupsPaginator:
    return client.get_paginator("list_backups"))

Waiters#

Type annotations and code completion for waiters from session.create_client("dynamodb").get_waiter("...").

# TableExistsWaiter usage example

from types_aiobotocore_dynamodb.waiter import TableExistsWaiter

def get_table_exists_waiter() -> TableExistsWaiter:
    return Session().client("dynamodb").get_waiter("table_exists")

DynamoDBServiceResource#

Type annotations and code completion for session.resource("dynamodb") as DynamoDBServiceResource boto3 documentation

# DynamoDBServiceResource usage example

from types_aiobotocore_dynamodb.service_resource import DynamoDBServiceResource

Collections#

Type annotations and code completion for collections from session.resource("dynamodb").*.

# ServiceResourceTablesCollection usage example

from types_aiobotocore_dynamodb.service_resource import ServiceResourceTablesCollection

def get_collection() -> ServiceResourceTablesCollection:
    return resource.tables

Resources#

Type annotations and code completion for additional resources from session.resource("dynamodb").*.

# Table usage example

from types_aiobotocore_dynamodb.service_resource import Table

def get_resource() -> Table:
    return resource.Table(...)

Literals#

Type annotations for literals used in methods and schema.

# ApproximateCreationDateTimePrecisionType usage example

from types_aiobotocore_dynamodb.literals import ApproximateCreationDateTimePrecisionType

def get_value() -> ApproximateCreationDateTimePrecisionType:
    return "MICROSECOND"

Type definitions#

Type annotations for type definitions used in methods and schema.