--- id: dyntastic version: "0.18.0" license: MIT license_treatment: permissive maintenance: aging --- # dyntastic — A DynamoDB library on top of Pydantic and boto3. License: permissive · Maintenance: aging · Downloads: 238.3K/mo ## What it is and what it does Dyntastic bridges Pydantic models and DynamoDB by letting you define table schemas as Python classes that inherit from Dyntastic (itself a Pydantic BaseModel). You get automatic serialization, validation, and type hints, plus a fluent API for DynamoDB operations: single-item reads and writes, queries with range-key conditions and filters, scans, batch reads and writes, and transactions. All operations are built on top of boto3, so they integrate with your existing AWS authentication and configuration. The library handles common DynamoDB patterns—pagination, consistent reads, sparse indexes, and conditional updates—without requiring you to write raw boto3 calls or manage item marshalling. Because it extends Pydantic, models work seamlessly in FastAPI and other frameworks that already know how to serialize and validate Pydantic objects. Use it for: - Define a DynamoDB table schema as a Pydantic model and perform type-safe CRUD operations without raw boto3 calls. - Query DynamoDB with range-key conditions and filter expressions using a fluent attribute API (e.g., A.timestamp < datetime(...)). - Batch read or write multiple items in a single operation, with automatic chunking to respect DynamoDB's 25-item and 16MB limits. - Use transactional writes to ensure multiple items are updated atomically or fail together. - Integrate DynamoDB models directly into FastAPI endpoints or other Pydantic-aware frameworks for request/response validation. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Dyntastic is a DynamoDB object-relational mapper built on Pydantic and boto3 that lets you define tables as Pydantic models and perform CRUD, query, scan, batch, and transactional operations against DynamoDB. Yes, if you are building on DynamoDB and want to avoid raw boto3 boilerplate. The package is stable, has no known vulnerabilities, and integrates cleanly with Pydantic and FastAPI. Maintenance is aging but the repository is active; if you need ongoing updates or encounter issues, be prepared to contribute or maintain a fork. The three dependencies are lightweight and widely used. ## Install pip install dyntastic uv add dyntastic poetry add dyntastic ## Installing dyntastic Before you install: Low friction: pure Python wheel with three runtime dependencies (boto3, pydantic, importlib-metadata). Maintenance is aging—last commit was 2025-04-08 and the project has not released since 2025-04-06, but the repository is active and not archived. License in practice: MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you include the license notice. Quickstart: from dyntastic import Dyntastic from pydantic import Field import uuid class Product(Dyntastic): __table_name__ = "products" __hash_key__ = "product_id" product_id: str = Field(default_factory=lambda: str(uuid.uuid4())) name: str price: float product = Product(name="bread", price=3.99) product.save() fetched = Product.get(product.product_id) Requires AWS credentials configured (via environment variables, IAM role, or boto3 config) and an existing DynamoDB table matching the model's __table_name__. Verify before relying: - Whether the package supports DynamoDB Streams or change data capture. - Performance characteristics under high-throughput workloads or large result sets. - Compatibility with DynamoDB local or moto for testing. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 238.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags dynamodb orm python, pydantic dynamodb models, dynamodb query library, boto3 wrapper dynamodb, dynamodb batch operations, dynamodb transactions python, type-safe dynamodb, dynamodb, orm, pydantic-integration [View on SkillFed](https://skillfed.io/packages/dyntastic) · [View on PyPI](https://pypi.org/project/dyntastic/)