API Reference
Core Module
Core functionality for botowrap extensions.
Provides base classes and managers for extending boto3 clients.
- class botowrap.core.BaseExtension[source]
Bases:
objectBase class for all client-extension wrappers.
Subclasses must implement attach(session) and detach(session).
DynamoDB Extension
DynamoDB extension for botowrap.
Provides enhanced DynamoDB client functionality with automatic serialization/deserialization, timestamp management, pagination helpers, and retry logic.
- class botowrap.extensions.dynamodb.DynamoDBConfig(max_retries: int = 5, log_consumed: bool = True, add_pagination: bool = True, add_timestamps: bool = True)[source]
Bases:
objectConfiguration options for the DynamoDB extension.
- class botowrap.extensions.dynamodb.DynamoDBExtension(config: DynamoDBConfig)[source]
Bases:
BaseExtensionAttaches all DynamoDB “document client” behavior onto boto3.client(‘dynamodb’).
Initialize DynamoDB extension with the given configuration.
Args:
config: Configuration options for the DynamoDB extension
- SERVICE = 'dynamodb'
- __init__(config: DynamoDBConfig) None[source]
Initialize DynamoDB extension with the given configuration.
Args:
config: Configuration options for the DynamoDB extension
- class botowrap.extensions.dynamodb.DynamoDBDocumentClient(client: BaseClient)[source]
Bases:
objectDynamoDB document client wrapper.
This class wraps a botocore DynamoDB client to provide document-style operations. It handles serialization and deserialization of Python types to/from DynamoDB’s AttributeValue format, adds pagination helpers, automatic retries for throttling, and optional features like timestamp injection and capacity logging.
The wrapper is automatically attached to new DynamoDB client instances via the _DocumentClientBootstrapper mixin.
Attributes
client: The underlying botocore DynamoDB client serializer: TypeSerializer for converting Python types to DynamoDB format deserializer: TypeDeserializer for converting DynamoDB format to Python types config: Configuration options for the DynamoDB extension
Initialize DynamoDB document client wrapper.
Args:
client: The DynamoDB client to wrap