Skip to main content

DynamoDB value serialisation and deserialisation

Project description

DynamoDB value serialisation and deserialisation

Convert values from AWS DynamoDB to native Python types.

Makes more sensible decisions about numbers and binary values, at the cost of floating-point precision. Very lightweight.

Installation

pip install dynamodb-serialise

Usage

import dynamodb_serialise

dynamodb_serialise.deserialise(
    {"M": {"foo": {"N": "42"}, "bar": {"B": "c3BhbQ=="}}}
)
# {'foo': 42, 'bar': b'spam'}

dynamodb_serialise.serialise(
    {'foo': 42, 'bar': b'spam'}, bytes_to_base64=True
)
# {"M": {"foo": {"N": "42"}, "bar": {"B": "c3BhbQ=="}}}

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

dynamodb-serialise-1.0.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

dynamodb_serialise-1.0.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file dynamodb-serialise-1.0.0.tar.gz.

File metadata

  • Download URL: dynamodb-serialise-1.0.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for dynamodb-serialise-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f61f94e72e2b942bbab6d380171e6d7842175130cc744eac3c23b9232057f045
MD5 9a077aa9a15de6ca4a9684ea55ecfa11
BLAKE2b-256 f66636224a8381993d3442f862601b55daffe6b2e07e59636225c0afa3cd0775

See more details on using hashes here.

File details

Details for the file dynamodb_serialise-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: dynamodb_serialise-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for dynamodb_serialise-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e61b973fdb058b3c0f10ff2c6cfac1455e0506c641250dabf0405aa2b62499be
MD5 f4bf2a9d7539a056f206e4920c8768e6
BLAKE2b-256 5035a721bd1f7066e071f1b136e5ddfa3e3bd3e36ea6e10b0dd046d44e5b5c72

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page