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.1.0.tar.gz
.
File metadata
- Download URL: finalsa_dynamo_dao-0.1.0.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 | fd93f76cd9ae1b75f34180445a5f837d54b2e6fd33fd6aa6f21e61c4df8a2319 |
|
MD5 | 13712f1b74159eb65e99c804702fbe33 |
|
BLAKE2b-256 | 6c375f611e9cc3427981eb79f362b2811ad35427aecfdf597bdb402938ba0ed5 |
File details
Details for the file finalsa_dynamo_dao-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: finalsa_dynamo_dao-0.1.0-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 | c1efa21b1045e6d51d30985f066667b9d1a0aa18697ee16d19fa1384780b5a52 |
|
MD5 | 2465c67e7dba49183706b3fdf746a578 |
|
BLAKE2b-256 | a129b965d9c1050fb60a3796c9943556ba8e60cb6afb620b90787ac63d95dfa3 |