Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Python ORM style interface to Amazon (AWS) DynamoDB using Schematics or Marshmallow for Schema validation

Project Description

DynamoDB + Marshmallow == Dynamallow

This package is a work in progress – Feedback / Suggestions / Etc welcomed!

Two awesome things, better together!

Dynamallow is a Python library that provides integration between the Boto v3 DynamoDB API and Marshmallow. Together they provide a simple, ORM inspired, interface to the DynamoDB service with a fully defined, strongly typed schema.

from dynamallow import MarshModel
from marshmallow import fields

class Book(MarshModel):
    class Table:
        name = 'prod-books'
        hash_key = 'isbn'
        read = 25
        write = 5

    class Schema:
        isbn = fields.String(validate=validate_isbn)
        title = fields.String()
        author = fields.String()
        publisher = fields.String()
        year = fields.Number()

# Store new documents directly from dictionaries
    "isbn": "12345678910",
    "title": "Foo",
    "author": "Mr. Bar",
    "publisher": "Publishorama"

# Work with the classes as objects
# You can pass attributes from the schema to the constructor
foo = Book(isbn="12345678910", title="Foo", author="Mr. Bar",

# Or assign attributes
foo = Book()
foo.isbn = "12345678910"
foo.title = "Foo" = "Mr. Bar"
foo.publisher = "Publishorama"

# In all cases they go through Schema validation, calls to
# .put or .save can result in ValidationError being raised.

# You can then fetch, query and scan your tables.

# Get on the hash key, and/or range key

# Query based on the keys

# Scan based on attributes
Book.scan(author="Mr. Bar")
Book.scan(author__ne="Mr. Bar")


Full documentation can be found online at:


  • Indexes – Currently there is no support for indexes.
  • Schema Migrations
  • Partial updates on save()

Release History

This version
History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(15.2 kB) Copy SHA256 Hash SHA256
Wheel 2.7 Sep 26, 2016
(10.3 kB) Copy SHA256 Hash SHA256
Source None Sep 26, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting