--- id: pynamodb version: "6.1.0" license: MIT license_treatment: permissive maintenance: active --- # pynamodb — A Pythonic Interface to DynamoDB License: permissive · Maintenance: active · Downloads: 4.7M/mo ## What it is and what it does PynamoDB is an ORM-like library that wraps the AWS DynamoDB API to make it more developer-friendly. Instead of writing verbose API calls, you define models as Python classes with typed attributes, then use simple method calls to create tables, save items, query, and scan. It handles the low-level details of serialization, pagination, and batch operations automatically. The library supports the full DynamoDB feature set: hash and range keys, global and local secondary indexes, streams, and complex filter expressions. It works with both AWS-hosted DynamoDB and local development instances. Dependencies are minimal (botocore for AWS communication and typing-extensions for type hints), and it supports Python 3.7 through 3.12, making it suitable for modern production applications. Use it for: - Define and manage DynamoDB tables as Python classes without writing raw JSON schemas or verbose API calls. - Query and filter DynamoDB items using Pythonic expressions instead of low-level attribute notation. - Batch save, update, or delete multiple items with automatic pagination and error handling. - Develop and test locally against DynamoDB Local by changing a single host configuration. - Stream DynamoDB changes (new/old images) into application logic for real-time event processing. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PynamoDB provides a Pythonic ORM-like interface to Amazon DynamoDB, simplifying table definition, querying, and data operations compared to the raw AWS API. Yes. PynamoDB is actively maintained, has no known vulnerabilities, installs with minimal friction, and is widely used. It significantly reduces boilerplate for DynamoDB applications. Install it if you're building on DynamoDB and want a cleaner API than raw boto3; skip it only if you need very low-level control or are already committed to a different ORM. ## Install pip install pynamodb uv add pynamodb poetry add pynamodb ## Installing pynamodb Before you install: Low friction: pure Python wheel with only two runtime dependencies (botocore and typing-extensions). Repository is actively maintained with recent commits and 2649 stars. License in practice: MIT license is permissive; you can use, modify, and distribute PynamoDB freely in commercial and private projects with minimal restrictions. Quickstart: pip install pynamodb from pynamodb.models import Model from pynamodb.attributes import UnicodeAttribute class UserModel(Model): class Meta: table_name = "dynamodb-user" last_name = UnicodeAttribute(hash_key=True) first_name = UnicodeAttribute(range_key=True) user = UserModel("John", "Denver") user.save() Requires an active AWS DynamoDB table or a local DynamoDB instance; AWS credentials must be configured in your environment. Verify before relying: - Performance characteristics and throughput limits compared to direct boto3 calls. - Compatibility with DynamoDB features added after the latest release date. - Whether monthly download figures reflect production usage or include test/CI environments. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 4.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags dynamodb python orm, aws dynamodb client library, nosql database python, dynamodb query interface, amazon dynamodb wrapper, python dynamodb models, dynamodb attribute mapping, dynamodb, aws-integration, orm [View on SkillFed](https://skillfed.io/packages/pynamodb) · [View on PyPI](https://pypi.org/project/pynamodb/)