pydynamodb
Python DB API 2.0 (PEP 249) client for Amazon DynamoDB
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 pydynamodbuv
uv add pydynamodbpoetry
poetry add pydynamodbInstalling 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
Tags
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object…
permissive · top 100 on PyPI
psycopg2-binarypsycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
alembicAlembic generates and manages database schema…
permissive · top 1,000 on PyPI
weaviate-clientA Python client library for connecting to and…
permissive · top 1,000 on PyPI
databricks-sql-connectorA Python client library that connects to…
permissive · top 1,000 on PyPI
psycopgPsycopg 3 is a PostgreSQL database adapter for…
copyleft · top 1,000 on PyPI
dmpythondmPython is a native Python driver for…
permissive · top 15,000 on PyPI
dyntasticDyntastic is a DynamoDB object-relational…
permissive · top 15,000 on PyPI
py-partiql-parserParses and executes PartiQL queries against…
permissive · top 5,000 on PyPI
pyathenajdbcPyAthenaJDBC wraps the Amazon Athena JDBC…
permissive · top 15,000 on PyPI
pynamodbPynamoDB provides a Pythonic ORM-like interface…
permissive · top 5,000 on PyPI
pyhdbA pure Python client library for connecting to…
permissive · top 15,000 on PyPI
PyAthenaPyAthena is a Python DB API 2.0 client for…
permissive · top 1,000 on PyPI
databricks-dbapiProvides a DBAPI 2.0 connection interface and…
permissive · top 15,000 on PyPI
redshift-connectorredshift_connector is a Python database driver…
permissive · top 1,000 on PyPI
amazon-dax-clientA Python client library that provides nearly…
permissive · top 15,000 on PyPI