dynamodb#
DynamoDB backend for cache.
- class pynamodb_mate.patterns.cache.backend.dynamodb.DynamoDBBackend(table_name: str, region: str, billing_mode: Optional[str] = 'PAY_PER_REQUEST', write_capacity_units: Optional[int] = None, read_capacity_units: Optional[int] = None, create: bool = True)[source]#
Base class for DynamoDB cache backend. You have to implement your own
serialize()anddeserialize()methods before use.- Parameters:
table_name – DynamoDB table name
region – aws region
billing_mode – billing model to use when creating the table
write_capacity_units – WCU configuration when creating the table
read_capacity_units – RCU configuration when creating the table
create – if True, create the table when initializing the backend, if table already exists, then do nothing. if False, you should create the table manually before using the backend.
- class pynamodb_mate.patterns.cache.backend.dynamodb.JsonDictDynamodbCache(table_name: str, region: str, billing_mode: Optional[str] = 'PAY_PER_REQUEST', write_capacity_units: Optional[int] = None, read_capacity_units: Optional[int] = None, create: bool = True)[source]#
A built-in Dynamodb cache designed to store JSON serializable dict.
- class pynamodb_mate.patterns.cache.backend.dynamodb.JsonListDynamodbCache(table_name: str, region: str, billing_mode: Optional[str] = 'PAY_PER_REQUEST', write_capacity_units: Optional[int] = None, read_capacity_units: Optional[int] = None, create: bool = True)[source]#
A built-in Dynamodb cache designed to store JSON serializable list.