GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Dynamoid/dynamoid: Ruby ORM for Amazon's DynamoDB.

BranchesTags
Open more actions menu

Latest commit

 

History

2,046 Commits
2,046 Commits

Folders and files

NameName
Last commit message
Last commit date
.dev/vagrant
.dev/vagrant
 
 
.github
.github
 
 
bin
bin
 
 
doc
doc
 
 
gemfiles
gemfiles
 
 
lib
lib
 
 
spec
spec
 
 
.gitignore
.gitignore
 
 
.overcommit.yml
.overcommit.yml
 
 
.rspec
.rspec
 
 
.rubocop.yml
.rubocop.yml
 
 
.rubocop_gemspec.yml
.rubocop_gemspec.yml
 
 
.rubocop_performance.yml
.rubocop_performance.yml
 
 
.rubocop_rspec.yml
.rubocop_rspec.yml
 
 
.rubocop_thread_safety.yml
.rubocop_thread_safety.yml
 
 
.ruby-version
.ruby-version
 
 
.simplecov
.simplecov
 
 
.tool-versions
.tool-versions
 
 
.yardopts
.yardopts
 
 
Appraisals
Appraisals
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Gemfile
Gemfile
 
 
Gemfile.lock
Gemfile.lock
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
Rakefile
Rakefile
 
 
SECURITY.md
SECURITY.md
 
 
Vagrantfile
Vagrantfile
 
 
book.toml
book.toml
 
 
docker-compose.yml
docker-compose.yml
 
 
dynamoid.gemspec
dynamoid.gemspec
 
 

Repository files navigation

Dynamoid

Gem Version Supported Build Status Maintainability Coveralls CodeCov Helpers Contributors RubyDoc.info License GitMoji SemVer 2.0.0 Keep-A-Changelog 1.0.0 Sponsor Project

A feature-rich and powerful Ruby ORM for Amazon DynamoDB, designed to provide a familiar ActiveRecord-like experience for Ruby applications.

Key Features

  • ActiveRecord-style DSL: Implements an interface and configuration similar to Rails' ActiveRecord.
  • Querying & Persistence: Provides methods for finding, querying, and updating models.
  • Advanced ORM Features: Supports associations, callbacks, validations, Dirty API, optimistic locking, and type casting.
  • Additional Attribute Types: Supports types not natively provided by Amazon DynamoDB, such as DateTime, Time, and more.
  • Transactions: Supports Amazon DynamoDB transactional operations.

Quick start

Installation

Add Dynamoid to your Gemfile:

gem 'dynamoid'

Or install it using bundle:

bundle add dynamoid

Alternatively, you can install the gem manually:

gem install dynamoid

Usage

To define a model, include Dynamoid::Document and declare your fields. Dynamoid supports ActiveModel validations and automatic timestamps:

class User
  include Dynamoid::Document

  field :name                        # Type defaults to :string
  field :email
  field :age, :integer
  field :active, :boolean, default: true

  validates :name, presence: true
  validates :email, format: { with: /@/ }
end

Once defined, you can interact with your models using a familiar API:

# Create and Save
user = User.create(name: 'Josh', email: '[email protected]')

# Find and Update
user = User.where(email: '[email protected]').first
user.update_attributes(age: 30)

# Querying
users = User.where(active: true).all.to_a

Essential Configuration

Minimal connection settings are required. You can configure Dynamoid in several ways, such as in config/initializers/dynamoid.rb (for Rails) or directly in your setup:

require 'dynamoid'

Dynamoid.configure do |config|
  config.access_key = 'REPLACE_WITH_ACCESS_KEY_ID'
  config.secret_key = 'REPLACE_WITH_SECRET_ACCESS_KEY'
  config.region = 'REPLACE_WITH_REGION' # e.g. 'us-west-2'
end

Documentation

  • API Reference: Comprehensive documentation for all classes and methods is available on API Reference.
  • User Guides: For detailed overviews and usage examples of specific features, see the online User Guides.

Compatibility

Dynamoid relies on aws-sdk-dynamodb (AWS SDK v3) and activemodel (>= 4.2). It officially supports Ruby >= 2.3 and Rails >= 4.2.

Compatibility is tested against the following versions:

  • Ruby: 2.3 - 4.0 (including JRuby 10.x)
  • Rails: 4.2 - 8.1

Contributing

We welcome contributions to Dynamoid! Please see our CONTRIBUTING.md guide for details on how to get started. Join us!

Security

See SECURITY.md.

License

The gem is available as open source under the terms of the MIT License License: MIT. See LICENSE for the official Copyright Notice.

Credits

Dynamoid was originally created in 2012 by Josh Symonds (original repository). Historical issues and discussions prior to the project's migration in 2015 can still be found in the legacy issue tracker.

Dynamoid borrows code, structure, and even its name very liberally from the truly amazing Mongoid. Without Mongoid to crib from none of this would have been possible, and I hope they don't mind me reusing their very awesome ideas to make Amazon DynamoDB just as accessible to the Ruby world as MongoDB.

Also, without contributors the project wouldn't be nearly as awesome. So many thanks to:

  • Chris Hobbs
  • Logan Bowers
  • Lane LaRue
  • Craig Heneveld
  • Anantha Kumaran
  • Jason Dew
  • Luis Arias
  • Stefan Neculai
  • Philip White *
  • Peeyush Kumar
  • Sumanth Ravipati
  • Pascal Corpet
  • Brian Glusman *
  • Peter Boling *
  • Andrew Konchin *

* Current Maintainers

About

Ruby ORM for Amazon's DynamoDB.

Topics

aws-dynamodbdynamodbhacktoberfestormruby

Resources

Readme
MIT license

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

612 stars

Watchers

20 watching

Forks

191 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.