MCPcopy Index your code
hub / github.com/dynamoose/dynamoose

github.com/dynamoose/dynamoose @v4.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v4.2.0 ↗ · + Follow
300 symbols 693 edges 123 files 24 documented · 8% updated 17d agov4.2.0 · 2026-05-05★ 2,247103 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<img src="https://github.com/dynamoose/dynamoose/raw/v4.2.0/internal/banner/Banner.png" width="400" max-width="90%" alt="Dynamoose" />







<a href="https://www.npmjs.com/package/dynamoose">
    <img src="https://img.shields.io/npm/v/dynamoose" alt="npm">
</a>
<a href="https://github.com/dynamoose/dynamoose/blob/main/LICENSE">
    <img src="https://img.shields.io/github/license/dynamoose/dynamoose" alt="License">
</a>
<a href="https://www.npmjs.com/package/dynamoose">
    <img src="https://img.shields.io/npm/dw/dynamoose" alt="npm Downloads">
</a>
<a href="https://github.com/dynamoose/dynamoose/blob/main/SPONSOR.md">
    <img src="https://img.shields.io/badge/sponsor-Dynamoose-brightgreen" alt="Sponsor Dynamoose">
</a>
<a href="https://github.com/dynamoose/dynamoose/actions">
    <img src="https://github.com/dynamoose/dynamoose/workflows/CI/badge.svg" alt="CI">
</a>
<a href="https://coveralls.io/github/dynamoose/dynamoose?branch=main">
    <img src="https://coveralls.io/repos/github/dynamoose/dynamoose/badge.svg?branch=main" alt="Coverage Status">
</a>
<a href="https://crowdin.com/project/dynamoosejscom">
    <img src="https://badges.crowdin.net/dynamoosejscom/localized.svg" alt="Crowdin Translation Status">
</a>
<a href="https://join.slack.com/t/dynamoose/shared_invite/enQtODM4OTI0MTc1NDc3LWI3MmNhMThmNmJmZDk5MmUxOTZmMGEwNGQzNTRkMjhjZGJlNGM5M2JmZjMzMzlkODRhMGY3MTQ5YjQ2Nzg3YTY">
    <img src="https://img.shields.io/badge/chat-on%20slack-informational.svg" alt="Slack Chat">
</a>
<a href="https://charlie.fish/contact">
    <img src="https://img.shields.io/badge/contact-me-blue" alt="Contact">
</a>
<a rel="me" href="https://mastodon.social/@dynamoose">
    <img alt="Mastodon Follow" src="https://img.shields.io/mastodon/follow/110203918766866705?style=social">
</a>
<a href="https://twitter.com/DynamooseJS">
    <img src="https://img.shields.io/twitter/follow/dynamoosejs?style=social" alt="Twitter">
</a>

Dynamoose is a modeling tool for Amazon's DynamoDB (inspired by Mongoose).

Getting Started

Description

Dynamoose is a modeling tool for Amazon's DynamoDB. Dynamoose is heavily inspired by Mongoose, which means if you are coming from Mongoose the syntax will be very familiar.

Key Features

  • Type safety
  • High level API
  • Easy to use syntax
  • DynamoDB Single Table Design Support
  • Ability to transform data before saving or retrieving items
  • Strict data modeling (validation, required attributes, and more)
  • Support for DynamoDB Transactions
  • Powerful Conditional/Filtering Support
  • Callback & Promise support
  • AWS Multi-region support
  • DynamoDB Streams support

Example

import * as dynamoose from "dynamoose";
import * as crypto from "crypto";

// Create a new Dynamoose model
const Book = dynamoose.model("Book", {
    "id": {
        "type": String,
        "hashKey": true,
        "default": () => crypto.randomUUID()
    },
    "title": {
        "type": String,
        "required": true
    },
    "author": {
        "type": String,
        "required": true
    },
    "publishedDate": {
        "type": Date,
        "required": true
    },
    "genre": {
        "type": String,
        "required": true,
        "enum": [
            "fantasy",
            "sci-fi",
            "mystery",
            "thriller",
            "romance",
            "non-fiction",
            "horror",
            "biography",
            "autobiography",
            "poetry",
            "children's",
            "young-adult",
            "other"
        ]
    },
    "summary": String,
    "pageCount": Number
});

// Add a new item to the Book table
const newBook = new Book({
    "title": "Harry Potter and the Philosopher's Stone",
    "author": "J.K. Rowling",
    "publishedDate": new Date("1997-06-26"),
    "genre": "fantasy",
    "summary": "The story of a young wizard who discovers he is a wizard and attends a magical school.",
    "pageCount": 223
});
await newBook.save();

// Retrieve all items from the Book table
const allBooks = await Book.scan().exec();
console.log(allBooks);

Resources

General

Social

Branch Strategy

Below you will find the current branch strategy for the project. Work taking place on the branches listed below might be further ahead than the versions on NPM. All documentation links found below will also be reflective of the published version on NPM. If you would like to live dangerously and run non-released versions, you can run npm install dynamoose/dynamoose#BRANCH (replacing BRANCH with the branch listed below). You will also find the most up-to-date documentation in the docs folder of the branch.

Branch Version NPM Tag Links
main 4.x.x - Documentation
v3 3.3.x - Documentation
v3.3.0 (tag) 3.3.0 latest-3 - Documentation
v2 2.8.x - Documentation
v2.8.8 (tag) 2.8.8 latest-2 - Documentation

Extension points exported contracts — how you extend this code

DynamoDBTypeCreationObject (Interface)
(no doc) [1 implementers]
packages/dynamoose/lib/Schema.ts
SerializerOptions (Interface)
(no doc)
packages/dynamoose/lib/Serializer.ts
SerializerInternalProperties (Interface)
(no doc)
packages/dynamoose/lib/Serializer.ts
PopulateSettings (Interface)
(no doc)
packages/dynamoose/lib/Populate.ts
PopulateInternalSettings (Interface)
(no doc)
packages/dynamoose/lib/Populate.ts

Core symbols most depended-on inside this repo

getInternalProperties
called by 576
packages/dynamoose/lib/InternalPropertiesClass.ts
func
called by 485
packages/dynamoose/lib/Schema.ts
toJSON
called by 84
packages/dynamoose/lib/Item.ts
exec
called by 75
packages/dynamoose/lib/ItemRetriever.ts
not
called by 48
packages/dynamoose/lib/Condition.ts
table
called by 47
packages/dynamoose/lib/Model/index.ts
get
called by 40
packages/dynamoose/lib/Model/index.ts
and
called by 27
packages/dynamoose/lib/Condition.ts

Shape

Method 85
Function 80
Interface 73
Class 51
Enum 11

Languages

TypeScript100%

Modules by API surface

packages/dynamoose/lib/Schema.ts41 symbols
packages/dynamoose/lib/Model/index.ts39 symbols
packages/dynamoose/lib/Item.ts26 symbols
packages/dynamoose/lib/ItemRetriever.ts25 symbols
packages/dynamoose/lib/Condition.ts21 symbols
packages/dynamoose/lib/Table/index.ts15 symbols
packages/dynamoose/test/utils/deep_copy.js12 symbols
packages/dynamoose/lib/Table/utilities.ts12 symbols
packages/dynamoose/lib/Instance.ts8 symbols
packages/dynamoose/test/Logger.js7 symbols
packages/dynamoose/lib/Serializer.ts7 symbols
packages/dynamoose/lib/utils/dynamoose/index_changes.ts5 symbols

For agents

$ claude mcp add dynamoose \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page