dynamodb-json
A DynamoDB json util from and to python objects
What it is and what it does
dynamodb-json is a lightweight serialization utility that mirrors Python's json.loads() and json.dumps() API to convert between plain Python objects and DynamoDB's type-annotated JSON format. DynamoDB stores data with explicit type markers (e.g., {"S": "value"} for strings, {"N": "4"} for numbers), and this package handles that marshalling automatically, including special handling for Decimal, datetime, UUID, and nested structures.
It sits between your Python code and boto3's DynamoDB client, letting you work with native Python types and serialize them to DynamoDB's wire format on demand. The package depends on simplejson, boto3, and six, and supports Python 2.7 through 3.12, though maintenance has been dormant since mid-2024.
Use it for:
- Serialize Python dictionaries with Decimal and datetime objects into DynamoDB JSON before sending via boto3 put_item or update_item calls.
- Deserialize DynamoDB query or scan responses back into plain Python objects with automatic type reconstruction.
- Build data transformation pipelines that move records between DynamoDB and other systems while preserving type semantics.
- Simplify test fixtures by converting readable Python objects into DynamoDB format for mock or integration tests.
- Handle nested and complex data structures (lists, sets, nested dicts) with automatic type annotation for DynamoDB compatibility.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts Python objects to and from DynamoDB's native JSON format, handling type conversions for strings, numbers, booleans, nulls, nested structures, and special types like Decimal and datetime.
Yes, if you are already using boto3 with DynamoDB and want to avoid manual type marshalling. The package is mature, has low install friction, and carries no known vulnerabilities. However, maintenance is dormant (no release in 818 days), so verify that it remains compatible with your Python and boto3 versions before adopting. License terms are unclear—confirm the Mozilla license variant before use in proprietary projects.
Install
dynamodb-json on PyPI
pip
pip install dynamodb-jsonuv
uv add dynamodb-jsonpoetry
poetry add dynamodb-jsonInstalling dynamodb-json
Before you install
Low friction installation with three lightweight runtime dependencies (simplejson, boto3, six). Maintenance is dormant—last commit was 2024-09-03 and no release in 818 days—but the package is marked Production/Stable and carries 168 repository stars, suggesting it is mature and stable enough for its narrow scope.
License in practice
License is marked 'Mozilla' in raw metadata but SPDX is null and treatment is unclear, creating ambiguity about exact license terms. Verify the actual license file in the repository before adopting in proprietary or copyleft-sensitive projects.
Quickstart
pip install dynamodb-json
from dynamodb_json import json_util as json
from decimal import Decimal
python_obj = {"name": "John", "balance": Decimal("19.2")}
dynamodb_json_str = json.dumps(python_obj)
python_obj_back = json.loads(dynamodb_json_str)
Verify before relying
- Exact Mozilla license variant (MPL 1.1, 2.0, etc.) and any copyleft obligations—SPDX is null and treatment is unclear.
- Whether dormant maintenance (no release in 818 days) poses risk for future Python or boto3 compatibility issues.
- Performance characteristics with large or deeply nested DynamoDB documents.
Package facts
| License | Mozilla (unclear) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — simplejson, boto3, six |
| Maintenance | dormant — 818 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,264,414/month — #2,679 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dynamodb_json-1.4.2-py2.py3-none-any.whl
Keywords: python, dynamodb, amazon, json, aws
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
dynamo-jsonConverts between DynamoDB's native JSON format…
permissive · top 15,000 on PyPI
json-encoderProvides JSON serialization with…
unclear · top 15,000 on PyPI
pynamodb-attributesProvides typed attribute classes for PynamoDB…
unclear · top 15,000 on PyPI
typing-jsonProvides type-aware JSON serialization and…
permissive · top 15,000 on PyPI
json-flattenConverts nested JSON objects into flat…
permissive · top 15,000 on PyPI
phpserializeConverts Python objects to and from PHP…
permissive · top 15,000 on PyPI
pynamodbPynamoDB provides a Pythonic ORM-like interface…
permissive · top 5,000 on PyPI
standardjsonProvides a JSON encoder that handles datetime,…
permissive · top 15,000 on PyPI
paradictParadict serializes and deserializes Python…
permissive · top 15,000 on PyPI
publish-event-snsPublishes Python dictionaries as JSON messages…
permissive · top 5,000 on PyPI