Install & Compatibility
Where this runs
tested against v1.43.64 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.7MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 2.9s · import 0.000s · 19MB
61MB installed
● package 61MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
DynamoDBClient
✓ from mypy_boto3_dynamodb import DynamoDBClient
✗ from mypy_boto3_dynamodb import DynamoDBClient
DynamoDBServiceResource
✓ from mypy_boto3_dynamodb import DynamoDBServiceResource
ServiceResource
✓ from mypy_boto3_dynamodb import ServiceResource
This quickstart demonstrates how to use `mypy-boto3-dynamodb` to type-hint a `boto3` DynamoDB client and a `CreateTableInputRequestTypeDef` for creating a table. The types provide autocompletion and static analysis for your DynamoDB operations.
import boto3
from mypy_boto3_dynamodb.client import DynamoDBClient
from mypy_boto3_dynamodb.type_defs import CreateTableInputRequestTypeDef
def create_table_example(table_name: str, region: str = 'us-east-1'):
client: DynamoDBClient = boto3.client('dynamodb', region_name=region)
table_params: CreateTableInputRequestTypeDef = {
'TableName': table_name,
'KeySchema': [
{'AttributeName': 'id', 'KeyType': 'HASH'}
],
'AttributeDefinitions': [
{'AttributeName': 'id', 'AttributeType': 'S'}
],
'BillingMode': 'PAY_PER_REQUEST'
}
print(f"Attempting to create table {table_name}...")
try:
response = client.create_table(**table_params)
print(f"Table creation initiated: {response['TableDescription']['TableArn']}")
except client.exceptions.ResourceInUseException:
print(f"Table {table_name} already exists.")
except Exception as e:
print(f"Error creating table: {e}")
if __name__ == '__main__':
# This example requires valid AWS credentials configured (e.g., via AWS CLI or environment variables)
# It's intended for demonstration; actual resource creation might incur costs.
# Create a dummy table name for testing.
test_table_name = 'MyTestTableForMypyBoto3'
create_table_example(test_table_name)
# Note: In a real scenario, you'd likely wait for the table to become active
# and then delete it after testing to avoid accumulating resources.
Upgrade
Version history
1.43.64latest on PyPI · released Aug 4, 2026
Audit
Dependencies
boto3requiredProvides the runtime objects for which these stubs provide types.