An utils package for using dynamodb
Project description
Dynamo Dao
Description
This is a simple DynamoDB Dao that can be used to interact with DynamoDB. It is a simple wrapper around the AWS SDK for DynamoDB.
Installation
pip install finalsa-dynamo-dao
Usage
from finalsa.dynamo.dao import DynamoDao
# Create a new model and its dao
class MyModelDao(DynamoDao):
id:str
name:str
age:int
created_at:datetime
class MyModelDao(DynamoDao):
PK:str
name:str
age:int
created_at:datetime
ttl:int
# Create a mapper
def my_mapper(item:dict) -> MyModelDao:
return MyModelDao(**item)
# Create a reverse mapper
def my_reverse_mapper(model:MyModelDao) -> dict:
return model.dict()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file finalsa-dynamo-dao-0.0.6.tar.gz
.
File metadata
- Download URL: finalsa-dynamo-dao-0.0.6.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a36c6d2827154d256a0cf60b19844fda5c65aa2bc9ada7b657ffaedc6082b2c7 |
|
MD5 | 81d67072f3d96d6db1cfcbe76d90592d |
|
BLAKE2b-256 | d01f2a92fe451341ee7c52a48b65aec5dae2bbe399f178c96bcd3c2e770c319d |
File details
Details for the file finalsa_dynamo_dao-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: finalsa_dynamo_dao-0.0.6-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a25dfa0e11f2f0cb430c0c8a52bab86d6e8bc479ed9f22c7c8aba1f9a0906e2 |
|
MD5 | b8bb675ca8506027a0d49aa60cd03ddd |
|
BLAKE2b-256 | 9af473b92baf72de86ca56c43f3f962c340e522eae59bb7d99d1847f2d0a2bec |