Skip to main content

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

finalsa-dynamo-dao-0.0.5.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

finalsa_dynamo_dao-0.0.5-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file finalsa-dynamo-dao-0.0.5.tar.gz.

File metadata

  • Download URL: finalsa-dynamo-dao-0.0.5.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for finalsa-dynamo-dao-0.0.5.tar.gz
Algorithm Hash digest
SHA256 e32e0d9c696f3ce7183b310c75d3c0148ad767ba2772c3d7d328f3fc1b3ffcf6
MD5 14cfe07bf24d0af36901e1c99dc1206c
BLAKE2b-256 de7af8da5eb40a8f0126838ff61dbe5e5d02c13946b1beefb7788398b2c119a1

See more details on using hashes here.

File details

Details for the file finalsa_dynamo_dao-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for finalsa_dynamo_dao-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c7e9c2d961e426c60cd77166d010eaaf10f2a1caddac422933e78be0dcedcdfc
MD5 b1eadba2098bd0744ba0c52c2cc4977b
BLAKE2b-256 70332642503960e95428fd4b7d8254b01ad81fe1bbca9b865a4a3fb4912fb5a6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page