Skip to main content

Async DynamoDB ORM with Pydantic

Project description

aiodynamodb

Async DynamoDB client + lightweight model layer built on aioboto3 and Pydantic v2.

PyPI Python License: MIT

AI Disclaimer

Some code and content in this repository was created with the assistance of AI tools. All code is reviewed thoroughly.

Features

  • Fully async API built on aioboto3
  • Pydantic v2 models for validation and typed data access
  • Table mapping via @table(...) decorator with GSI/LSI support
  • Persistent connection pooling via context manager
  • Query and scan with typed, paginated results
  • Conditional writes/deletes, transactions, and batch operations

Installation

pip install aiodynamodb

Quickstart

import asyncio
from aiodynamodb import DynamoDB, DynamoModel, table


@table("users", hash_key="user_id")
class User(DynamoModel):
    user_id: str
    name: str
    email: str | None = None


async def main() -> None:
    async with DynamoDB() as db:
        await db.create_table(User)
        await db.put(User(user_id="u1", name="Alice", email="alice@example.com"))
        user = await db.get(User, hash_key="u1")
        print(user)


asyncio.run(main())

Documentation

Full documentation is available at aiodynamodb.com, including:

Running Tests

make test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiodynamodb-0.0.10.tar.gz (197.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiodynamodb-0.0.10-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file aiodynamodb-0.0.10.tar.gz.

File metadata

  • Download URL: aiodynamodb-0.0.10.tar.gz
  • Upload date:
  • Size: 197.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aiodynamodb-0.0.10.tar.gz
Algorithm Hash digest
SHA256 bd211f96d29176194e791eb3b37fae797bdcd0adaa7126d0d9fe8ff0a8319236
MD5 abb80ea3f228d60a2e05b7f0f7ad51e5
BLAKE2b-256 92329c792d5588a89972cc6f3f9127da51d8732557c5590065e1999cc230c187

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiodynamodb-0.0.10.tar.gz:

Publisher: release.yml on nikumar1206/aiodynamodb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aiodynamodb-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: aiodynamodb-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 24.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aiodynamodb-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 cd2e1325d8a0fa898ef1a5b3dff2ffacfc22ef1800e2e51ae85e17abbe64227a
MD5 9c8db9a6862e54ef1a3e95e77de7e3b2
BLAKE2b-256 847afd7e47f07060bf0ae420d2995d0400474bee8bb3fe4e977ed956952993ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiodynamodb-0.0.10-py3-none-any.whl:

Publisher: release.yml on nikumar1206/aiodynamodb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page