Skip to main content

DynamoDB ODM for Python

Project description

DynamoDB Object Document Mapper (ODM) for Python

Installation

pip install dynamodm

Usage

from dynamodm import DynaModel, Field

class User(DynaModel):
	sub: str = Field(pk=True)
	name: str = Field(sk=True)
	age: int

user = User(sub="user", name="John Doe", age=42)

async def main():
	await user.put()
	# User(sub='user', name='John Doe', age=42)
	await User.get(pk="user", sk="John Doe")
	# User(sub='user', name='John Doe', age=42)
	await User.query(pk="user", sk="John Doe",operator="begins_with")
	# [User(sub='user', name='John Doe', age=42)]
	await User.delete(pk="user", sk="John Doe")
	# None
	

Features

  • Type hints
  • Automatic schema generation
  • Automatic table creation
  • Automatic table updates
  • Automatic table deletion

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

dynamodm-0.0.4.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

dynamodm-0.0.4-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file dynamodm-0.0.4.tar.gz.

File metadata

  • Download URL: dynamodm-0.0.4.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/22.6.0

File hashes

Hashes for dynamodm-0.0.4.tar.gz
Algorithm Hash digest
SHA256 8b2840d2e143f43ee5afff13b0d56b1a2514118d3d385e0c7314eee6b9832395
MD5 94800a23887c9cadc7d2582c06177aae
BLAKE2b-256 7f30c98502a4d88e354d8abb5f3a57483bb517a6e530d5896513441b257f4d2d

See more details on using hashes here.

File details

Details for the file dynamodm-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: dynamodm-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/22.6.0

File hashes

Hashes for dynamodm-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a298ef7c0cd3429c8676b3f8d6b7b7e25253e13e70c4e155073ea0f6cfdacc58
MD5 dbb5b2626687ed4b724397f42b03d839
BLAKE2b-256 f4c01d54fba7ee15098a251c5733bd56f3b80088f3cd410da993649ebebe1ac0

See more details on using hashes here.

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