Skip to content

klaascharlier/InPynamoDB

This branch is 1 commit ahead of MyMusicTaste/InPynamoDB:master.

Folders and files

NameName
Last commit message
Last commit date
May 8, 2020
May 8, 2020
Jan 24, 2018
Jan 15, 2018
Jun 15, 2018
Jul 2, 2019
May 8, 2020
May 8, 2020
May 8, 2020
Jan 26, 2018

Repository files navigation

InPynamoDB

This transforms PynamoDB's basic methods working asynchronously used aiobotocore.

If you find any bugs of suggestions, please leave issue.

There's no main documentation yet, for the time being, you can refer to PynamoDB documentation.

Requirements

  • Python 3.6 and above for this library is using async/await keyword.

Installation

$ pip install InPynamoDB

Basic Usage

  • Declare model
from inpynamodb.models import Model
from inpynamodb.attributes import UnicodeAttribute

class UserModel(Model):
    """
    A DynamoDB User
    """
    class Meta:
        table_name = "dynamodb-user"
    email = UnicodeAttribute(null=True)
    first_name = UnicodeAttribute(range_key=True)
    last_name = UnicodeAttribute(hash_key=True)
  • GET
user = await UserModel.get(hash_key="John", range_key="Doe")
  • UPDATE
await user.update()

About

PynamoDB asynchronous plugin

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%