skillfed

dynamodb-json

A DynamoDB json util from and to python objects

dynamodb-json v1.4.2 3.3M downloads/30d#2,679 on PyPI168
License unclear Mozilla DORMANT released

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-json

uv

uv add dynamodb-json

poetry

poetry add dynamodb-json

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

dynamodb json serializationconvert python to dynamodb formatdynamodb type conversionaws dynamodb json utildynamodb data marshallingpython dynamodb serializerdynamodb json loads dumps
dynamodbserializationaws

More Database packages