Reputation: 1196
I am using PynamoDB for accessing my AWS DynamoDB tables, Now I need to implement the caching via AWS DAX .
Does PynamoDB support DAX , even if some source code changes are required to make it work , I can do it myself too. Kindly guide me accordingly.
Upvotes: 2
Views: 363
Reputation: 2693
I forked from uncovertruth/PynamoDB which added the support for DAX. you can install it with
pip install dynamodb-dax
usage example here
class CacheModel(Model):
"""
A DynamoDB Caching table
"""
class Meta:
table_name = "cachingDax"
region = 'us-east-1'
dax_read_endpoints = ['example.cache.amazonaws.com:8111']
dax_write_endpoints = ['example.cache.amazonaws.com:8111']
cacheKey = UnicodeAttribute(hash_key=True)
data = JSONAttribute(default={})
Upvotes: 2