ProductPromotion
Logo

Rust

made by https://0x3d.site

GitHub - softprops/dynomite: ⚡🦀 🧨 make your rust types fit DynamoDB and visa versa
⚡🦀 🧨 make your rust types fit DynamoDB and visa versa - softprops/dynomite
Visit Site

GitHub - softprops/dynomite: ⚡🦀 🧨 make your rust types fit DynamoDB and visa versa

GitHub - softprops/dynomite: ⚡🦀 🧨 make your rust types fit DynamoDB and visa versa

Overview

Goals

  • ⚡ make writing dynamodb applications in rust a productive experience
  • 🦀 exploit rust's type safety features
  • 👩‍💻 leverage existing work of the rusoto rust project
  • ☔ commitment to supporting applications built using stable rust
  • 📚 commitment to documentation

Features

  • 💌 less boilerplate
  • ♻️ automatic async pagination
  • 🕶️ client level retry interfaces for robust error handling

From this

use std::collections::HashMap;
use rusoto_dynamodb::AttributeValue;
use uuid::Uuid;

let mut item = HashMap::new();
item.insert(
  "pk".to_string(), AttributeValue {
    s: Some(Uuid::new_v4().to_hyphenated().to_string()),
    ..AttributeValue::default()
  }
);
item.insert(
  // 🤬typos anyone?
  "quanity".to_string(), AttributeValue {
    n: Some("whoops".to_string()),
    ..AttributeValue::default()
  }
);

To this

use dynomite::Item;
use uuid::Uuid;

#[derive(Item)]
struct Order {
  #[dynomite(partition_key)]
  pk: Uuid,
  quantity: u16
}

let item = Order {
  pk: Uuid::new_v4(),
  quantity: 4
}.into();

Please see the API documentation for how to get started. Enjoy.

📦 Install

In your Cargo.toml file, add the following under the [dependencies] heading

dynomite = "0.10"

🤸 Examples

You can find some example application code under dynomite/examples

DynamoDB local

AWS provides a convenient way to host a local instance of DynamoDB for testing.

Here is a short example of how to get up a testing locally quickly with both dynomite as well as rusoto_dynamodb.

In one terminal spin up a Docker container for DynamoDB local listening on port 8000

$ docker run --rm -p 8000:8000 amazon/dynamodb-local

In another, run a rust binary with a client initialized like you see the the local.rs example

Resources

Doug Tangren (softprops) 2018-2020

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory