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.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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

Hashes for finalsa_dynamo_dao-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fd93f76cd9ae1b75f34180445a5f837d54b2e6fd33fd6aa6f21e61c4df8a2319
MD5 13712f1b74159eb65e99c804702fbe33
BLAKE2b-256 6c375f611e9cc3427981eb79f362b2811ad35427aecfdf597bdb402938ba0ed5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for finalsa_dynamo_dao-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c1efa21b1045e6d51d30985f066667b9d1a0aa18697ee16d19fa1384780b5a52
MD5 2465c67e7dba49183706b3fdf746a578
BLAKE2b-256 a129b965d9c1050fb60a3796c9943556ba8e60cb6afb620b90787ac63d95dfa3

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