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

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

AI Disclaimer

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

Installation

pip install aiodynamodb

Quickstart

import asyncio
from aiodynamodb import DynamoDB, DynamoModel, HashKey, table


@table("users")
class User(DynamoModel):
    user_id: HashKey[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:

Contributing

Clone the repo and install dev dependencies:

make install-dev

Make your changes, then:

make lint         # lint and format
make typecheck    # type check
make test         # run tests

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.11.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.11-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aiodynamodb-0.0.11.tar.gz
Algorithm Hash digest
SHA256 a423a868d8857925bc54782f3d56426959d109df61c987d0f20c9002a0b37e18
MD5 986f434865de74cf8ab1266481c2eefe
BLAKE2b-256 cad55675b6827a8a9b3ba1628c5a82ca87cb31f5fe21ca3b78a60fdcc39e199b

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiodynamodb-0.0.11.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.11-py3-none-any.whl.

File metadata

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

File hashes

Hashes for aiodynamodb-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 f55b90afbb16eed1befdfc57f70fa90bbc3c2428b72c237ab93cda4fa4e18cd4
MD5 d473f6b7a975827071b5de7b1a68f8c2
BLAKE2b-256 d786cc607dc88148e32d83da7f6d09aeba031866d0b94d593d21415220ab226b

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiodynamodb-0.0.11-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