skillfed

pydynamodb

Python DB API 2.0 (PEP 249) client for Amazon DynamoDB

pydynamodb v0.8.2 610.9K downloads/30d#5,763 on PyPI22
Permissive license MIT Active released

What it is and what it does

PyDynamoDB bridges Python's DB API 2.0 standard (PEP 249) to Amazon DynamoDB, letting you query and manipulate DynamoDB tables using SQL-like syntax instead of the native DynamoDB API. It implements PartiQL for DML operations (SELECT, INSERT, UPDATE, DELETE) and extends support to DDL operations (CREATE TABLE, ALTER TABLE, DROP TABLE) with MySQL-like syntax, plus utility commands like SHOW TABLES and DESC TABLE.

The package handles automatic type conversion between Python built-in types and DynamoDB's type system, including dates and datetimes, and provides both standard cursor iteration and dict-based result sets for JSON conversion. It includes transaction and batch operation support, and offers a SQLAlchemy dialect for use with ORMs and tools like Superset. Runtime dependencies are boto3 and botocore for AWS communication, tenacity for retry logic, and pyparsing for query parsing.

Use it for:

  • Query DynamoDB tables using standard SQL SELECT syntax without learning the native DynamoDB API.
  • Build ETL pipelines that read from and write to DynamoDB using familiar DB API 2.0 cursor patterns.
  • Integrate DynamoDB with SQLAlchemy-based applications or Superset dashboards via the provided dialect.
  • Perform batch inserts and updates with automatic parameter serialization and type conversion.
  • Create or alter DynamoDB table schemas using MySQL-like DDL statements from Python code.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

PyDynamoDB is a DB API 2.0 client for Amazon DynamoDB that executes SQL-like queries (PartiQL for DML, MySQL-like syntax for DDL) against DynamoDB tables and provides a SQLAlchemy dialect.

Yes. PyDynamoDB is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and offers low install friction. It is worth installing if you need to query DynamoDB via standard SQL syntax or integrate DynamoDB with DB API 2.0–aware tools like SQLAlchemy. The production-stable classifier and recent activity support reliability for production use.

Install

pydynamodb on PyPI

pip

pip install pydynamodb

uv

uv add pydynamodb

poetry

poetry add pydynamodb

Installing pydynamodb

Before you install

Low install friction with a pure-Python wheel and four stable runtime dependencies (boto3, botocore, tenacity, pyparsing). Actively maintained with a recent commit on 2026-04-12 and production-stable status.

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 pydynamodb import connect

cursor = connect(aws_access_key_id="key",
                aws_secret_access_key="secret",
                region_name="us-east-1").cursor()
cursor.execute('SELECT * FROM "table_name"')
print(cursor.fetchall())

AWS credentials (access key ID and secret access key) and a valid DynamoDB table must be accessible in the specified region.

Verify before relying

  • Performance characteristics and query latency for large result sets or complex PartiQL operations.
  • Extent of transaction support beyond basic begin() and commit() operations.
  • Compatibility scope with Superset SQL Lab and graphing features.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 4 — boto3, botocore, tenacity, pyparsing
Maintenance actively maintained — 132 days since the last release
Last repo commit
First released
Downloads 610,894/month — #5,763 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pydynamodb-0.8.2-py3-none-any.whl

Keywords: DB-API, Amazon, AWS, DynamoDB

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

Tags

dynamodb sql clientdb api 2.0 dynamodbpydynamodb querydynamodb python driversqlalchemy dynamodb dialectdynamodb cursor interfacepartiql python client
dynamodbsql-interfaceaws

More Front-Ends packages