Common attributes for PynamoDB
Project description
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
)UnicodeDelimitedTupleAttribute
- a delimiter-separated value, useful for storing composite keysUnicodeEnumAttribute
- serializes a string-valuedEnum
into a Unicode (S
-typed) attributeUnicodeProtobufEnumAttribute
- serializes a Protobuf enum into a Unicode (S
-typed) attributeIntegerEnumAttribute
- serializes a int-valuedEnum
into a number (N
-typed) attributeTimedeltaAttribute
,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
Testing
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pynamodb-attributes-0.4.0.tar.gz
(16.0 kB
view hashes)
Built Distribution
Close
Hashes for pynamodb-attributes-0.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bea2db4027e19dc9ca7a051278a41e5bdffb460c9dfae5b2a137acd6f9c6aad |
|
MD5 | 099cbdadf4c02929813a9d1f03c96ff5 |
|
BLAKE2b-256 | e1d9e12e712c3dfa6d91e4f153116ee0f054b90854064d7fbcaab02f60c9f5bc |
Close
Hashes for pynamodb_attributes-0.4.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59a9db742840eda024e1e22c24981d691c94816ad98ea6ec8b647951a37fa5bd |
|
MD5 | 2745929a9fc58aece54a5b0e25bf252a |
|
BLAKE2b-256 | b0f0cdf5914258f0e38ba0f70a66dba09afb39892a940323c1d812b92c5579c6 |