Skip to main content

DYNAMORE

Dynamore is extremely simple Python library for managing entities on DynamoDb. It’s designed to be used together with REST API and only supports single table design.

Installation

Install from Pypi:

$ pip install dynamore

Quick start

Dynamore doesn’t manage your tables so create DynamoDb table beforehand e.g. provisioning by CloudFormation.

Here’s the simple example on how to create Person schema and store it to DynamoDb:

from dynamore.dynamodb_proxy import DynamoDbProxy
from dynamore.entity import Entity


class Person(Entity):
    SCHEMA = {
        "title": "PERSON",
        "type": "object",
        "required": ["name", "age", "gender", "id_number"],
        "properties": {
            "name": {"type": "string"},
            "age": {"type": "integer", "min": 0, "max": 123},
            "gender": {"type": "string", "enum": ["male", "female"]},
            "id_number": {"type": "string"},
        },
        "additionalProperties": False,
    }

    ID_ATTRIBUTE = "id_number"

db = DynamoDbProxy(table_name="MyTable")
data = {
    "name": "Jeanne",
    "age": 123,
    "gender": "female",
    "id_number": "123456"
}
_ = db.post(entity_class=Person, data=data)
# Get single item
item = db.get(
    entity_class=Person, data={"id_number": data["id_number"]}
)
# Get all items of type "Person"
items = dynamodb_proxy.get(entity_class=Person)

First a new entity class Person defined. It’s schema is defined using jsonschema and id attribute defines the name of the attribute that is used for uniqueness.

Dynamore stores data to DynamoDb in the following format:

PK

SK

name

age

gender

PERSON

123456

Jeanne

123

female

By default entity uses partition key “PK” and sort key “SK” value but you can define them otherwise by overriding pr_keys-method.

Metadata

Release files for dynamore 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dynamore 0.1.1
File Size Uploaded Provenance Actions
dynamore-0.1.1.tar.gz 5.8 kB Without provenance Details for dynamore-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dynamore 0.1.1
File Interpreter ABI Platform Actions
dynamore-0.1.1-py3-none-any.whl Python 3 none any Details for dynamore-0.1.1-py3-none-any.whl

Total release size: 12.1 kB

Release files / dynamore-0.1.1.tar.gz

Download URL dynamore-0.1.1.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e623eb00af7edffb9aad0826fb2125db1971d2aa183dbbc9261656bc30867ceb
BLAKE2b-256 checksum
How to use checksums
0110d58f0d1183ea003a78c08743bc6433daaa3bdfba93cdc4a766d5edd0b8f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.1 Darwin/19.5.0

Release files / dynamore-0.1.1-py3-none-any.whl

Download URL dynamore-0.1.1-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f522b97cbdd1e31fab96fa7f0d94ee89b691b735df473b7a38bf205b12b5b1a
BLAKE2b-256 checksum
How to use checksums
1261b1ee643109338902f205a3036603a3c55750676ba20ce77be89e18c2e2a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.1 Darwin/19.5.0

Security for dynamore 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page