This Python 3 library contains compound and high-level PynamoDB attributes:
-
FloatAttribute
– same asNumberAttribute
but whose value is typed asfloat
-
IntegerAttribute
– same asNumberAttribute
but whose value is typed asint
(rather thanfloat
) -
IntegerSetAttribute
– same asNumberSetAttribute
but whose value is typed asint
(rather thanfloat
) -
UnicodeDelimitedTupleAttribute
- a delimiter-separated value, useful for storing composite keys -
UnicodeEnumAttribute
- serializes a string-valuedEnum
into a Unicode (S
-typed) attribute -
UnicodeProtobufEnumAttribute
- serializes a Protobuf enum into a Unicode (S
-typed) attribute -
IntegerEnumAttribute
- serializes a int-valuedEnum
into a number (N
-typed) attribute -
TimedeltaAttribute
,TimedeltaMsAttribute
,TimedeltaUsAttribute
– serializestimedelta
s as integer seconds, milliseconds (ms) or microseconds (µs) -
TimestampAttribute
,TimestampMsAttribute
,TimestampUsAttribute
– serializesdatetime
s as Unix epoch seconds, milliseconds (ms) or microseconds (µs) -
IntegerDateAttribute
- serializesdate
as an integer representing the Gregorian date (e.g.20181231
) -
UUIDAttribute
- serializes aUUID
Python object as aS
type attribute (e.g.'a8098c1a-f86e-11da-bd1a-00112444be1e'
) -
UnicodeDatetimeAttribute
- ISO8601 datetime strings with offset information
The tests in this repository use an in-memory implementation of dynamodb
. To run the tests locally, make sure DynamoDB Local is running. It is available as a standalone binary, through package managers (e.g. Homebrew) or as a Docker container:
docker run -d -p 8000:8000 amazon/dynamodb-local
Afterwards, run tests as usual:
pytest tests