dynantic-usage

Model DynamoDB data with Pydantic and build type-safe queries.

10|3|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/Simi24/dynantic --skill dynantic-usage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dynantic-usage
Source: https://github.com/Simi24/dynantic/tree/main
Command: npx skills add https://github.com/Simi24/dynantic --skill dynantic-usage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a guided, code-focused path to using the Dynantic library to interact with DynamoDB in a type-safe, Pydantic-driven style, reducing boilerplate and runtime errors.

Core Concepts

  • Pydantic-based models with a metaclass-driven DSL for building queries, updates, and conditional writes.
  • Support for partition keys, sort keys, GSIs, and polymorphic single-table designs.
  • Transparent serialization/deserialization between Python types and DynamoDB JSON, including numeric precision handling.

Quick Start

  • Define a Dynantic model using Key() and SortKey() decorators, then call save() to persist.
  • Retrieve items with Model.get(pk, sk) or Model.query(pk).all() for related results.
  • Build complex operations with update() for atomic changes and .filter() on queries/scans for non-key attributes.

Frequently Asked Questions about dynantic-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use Pydantic models for type-safe DynamoDB operations in Python?

Type-safe DynamoDB access with Pydantic is achieved by defining models using Key() and SortKey() decorators, then persisting them via save() and retrieving them through get() or query() methods.

What is the best way to build complex queries and atomic updates in DynamoDB?

Building complex queries and atomic updates in DynamoDB is done through a metaclass-driven DSL that provides .filter() for non-key attributes and update() for atomic changes.

Can I implement a polymorphic single-table design with DynamoDB and Python?

You can implement polymorphic single-table designs in DynamoDB using Python by leveraging Pydantic-driven models that natively support partition keys, sort keys, and global secondary indexes.

Do I need boto3 and pydantic to handle DynamoDB serialization in Python?

You need boto3 and pydantic to handle DynamoDB serialization because they provide the backend connection and type validation required to ensure correct DynamoDB data types and numeric precision.

Does this DynamoDB ORM work with LocalStack for serverless application testing?

This DynamoDB ORM works with LocalStack for serverless application testing because it targets any DynamoDB-compatible backend, enabling local validation of single-table designs before AWS deployment.