class MyModel(Model):
    Meta = dynamodb_table_meta(__name__)

    key = UnicodeAttribute(hash_key=True)
    default_delimiter = UnicodeDelimitedTupleAttribute(MyTuple, null=True)
    custom_delimiter = UnicodeDelimitedTupleAttribute(MyTuple, delimiter=".", null=True)
    untyped = UnicodeDelimitedTupleAttribute(tuple, null=True)
class MyModel(Model):
    Meta = dynamodb_table_meta(__name__)

    key = UnicodeAttribute(hash_key=True)
    value = TimedeltaAttribute(null=True)
    value_ms = TimedeltaMsAttribute(null=True)
    value_us = TimedeltaUsAttribute(null=True)
class MyModel(Model):
    Meta = dynamodb_table_meta(__name__)

    key = UnicodeAttribute(hash_key=True)
    value = UnicodeEnumAttribute(MyEnum, null=True)
    value_with_unknown = UnicodeEnumAttribute(
        MyEnum,
        unknown_value=MyEnum.unknown_key,
        null=True,
    )
    value_with_missing = UnicodeEnumAttribute(MyEnumWithMissing, null=True)
Exemple #4
0
class MyModel(Model):
    Meta = dynamodb_table_meta(__name__)

    key = UnicodeAttribute(hash_key=True)
    default = UnicodeDatetimeAttribute(null=True)
    no_force_tz = UnicodeDatetimeAttribute(force_tz=False, null=True)
    force_utc = UnicodeDatetimeAttribute(force_utc=True, null=True)
    force_utc_no_force_tz = UnicodeDatetimeAttribute(
        force_utc=True,
        force_tz=False,
        null=True,
    )
    custom_format = UnicodeDatetimeAttribute(fmt=CUSTOM_FORMAT, null=True)
Exemple #5
0
class MyModel(Model):
    Meta = dynamodb_table_meta(__name__)

    key = UnicodeAttribute(hash_key=True)
    value = IntegerAttribute(null=True)