Skip to main content

DynoDino

DynoDino is a set of useful methods to speed up the conversion of objects to AWS services, specifically DynamoDB. This library allows you to easily convert JSON data to DynamoDB format and vice versa.

Installation

To install the library, use pip:

pip install dyno-dino

Features

JSON to DynamoDB Conversion

The library provides methods to convert JSON data structures to the format accepted by DynamoDB. This includes converting common data types like strings, numbers, lists, and nested dictionaries.

Example Usage:

from dyno_dino import convert_json_to_dynamodb

json_data = {
    "name": "Victor",
    "phone": "5587975648710",
    "age": 30,
    "is_verified": True,
    "account_balance": 1234.56,
    "nested_object": {
        "key1": "value1",
        "key2": 2
    },
    "list_data": ["item1", "item2", "item3"]
}

dynamodb_data = convert_json_to_dynamodb(json_data)
print(dynamodb_data)

DynamoDB to JSON Conversion

You can also convert data from DynamoDB format back to JSON, making it easier to manipulate and visualize the data.

Example Usage:

from dyno_dino import convert_dynamodb_to_json

dynamodb_data = {
    "M": {
        "name": {"S": "Victor"},
        "phone": {"S": "5587975648710"},
        "age": {"N": "30"},
        "is_verified": {"BOOL": True},
        "account_balance": {"N": "1234.56"},
        "nested_object": {
            "M": {
                "key1": {"S": "value1"},
                "key2": {"N": "2"}
            }
        },
        "list_data": {"L": [
            {"S": "item1"},
            {"S": "item2"},
            {"S": "item3"}
        ]}
    }
}

json_data = convert_dynamodb_to_json(dynamodb_data)
print(json_data)

Available Methods

convert_json_to_dynamodb(data: dict) -> dict

Converts a JSON dictionary to DynamoDB format.

  • Parameters:
    • data (dict): JSON dictionary to be converted.
  • Returns:
    • Dictionary in DynamoDB format.

convert_dynamodb_to_json(dynamodb_data: dict) -> dict

Converts a DynamoDB format dictionary to JSON.

  • Parameters:
    • dynamodb_data (dict): DynamoDB format dictionary to be converted.
    • remove_content (bool, optional): Whether to remove the "content" key if it exists. Default is False
  • Returns:
    • JSON dictionary.

Contributing

Contributions are welcome! Feel free to open issues or pull requests on the GitHub repository.

Metadata

Release files for dyno-dino 1.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dyno-dino 1.0.8
File Size Uploaded Provenance
dyno_dino-1.0.8.tar.gz 3.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for dyno-dino 1.0.8
File Interpreter ABI Platform
dyno_dino-1.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 6.7 kB

Release files / dyno_dino-1.0.8.tar.gz

Download URL dyno_dino-1.0.8.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1a4b7dc90a8e0688fd26d14d8a24826f7bf000d9d59dfe99552c750950c31c54
BLAKE2b-256 checksum
How to use checksums
bb2284994b6285a56d6fe2fdf9bf8f756e5162d06204a7c843aa5024d10c8e7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / dyno_dino-1.0.8-py3-none-any.whl

Download URL dyno_dino-1.0.8-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa685ef0fe549e61a7d333dbae7cb4b94d833baa50ba161ed8d57ee783298348
BLAKE2b-256 checksum
How to use checksums
529f54f058b9b14e609b9be1e0f136efa549e1835538f98ed4848ca6b4dd9c02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Security for dyno-dino 1.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page