<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).
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.
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);
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 |
$ claude mcp add dynamoose \
-- python -m otcore.mcp_server <graph>