storing cache using dynamodb
Project description
pynamoCacher
Description
A package which allows you to use dynamodb to cache
ToDos
- Dax support
- Auto create table
- policy template
- example readme
Examples
SetUp
class Cache(Cacher):
class Meta:
table_name = 'dynamoCache'
region = 'us-east-1'
aws_access_key_id = USER
aws_secret_access_key = PW
billing_mode= 'PAY_PER_REQUEST'
addCache
sampleInput = {
'query': 'testQuery',
'fruit': 'strawberry'
}
sampleInput2 = {
'query': 'testQuery',
'fruit': 'orange'
}
sampleReturn = {
'pine': 'apple'
}
Cache.addCache(
input = sampleInput,
output = sampleReturn
)
getCache
output = Cache.getCache(sampleInput)
print(output)
{"pine": "apple"}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dynamocacher-0.0.4.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for dynamocacher-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dba4a8b6c62735063199fbeb3dc327291881f55ebf72fbb58dbfcce7a80de3ca |
|
MD5 | 7d5fd6e6b290ea85c754a5fc72873bf2 |
|
BLAKE2b-256 | 7e1aaca0cf734ba17a74ff37f98dc18d098bf35c7e09c304a11ab563bdfbbe28 |