dynamodb_encryption_sdk.internal.formatting.material_description
Tools for serializing and deserializing material descriptions.
Warning
No guarantee is provided on the modules and APIs within this namespace staying consistent. Directly reference at your own risk.
Functions
|
Deserialize a serialized material description attribute into a material description dictionary. |
|
Serialize a material description dictionary into a DynamodDB attribute. |
- dynamodb_encryption_sdk.internal.formatting.material_description.serialize(material_description: Dict[str, str]) Dict[str, ByteString] [source]
Serialize a material description dictionary into a DynamodDB attribute.
- Parameters
material_description (dict) – Material description dictionary
- Returns
Serialized material description as a DynamoDB binary attribute value
- Return type
- Raises
InvalidMaterialDescriptionError – if invalid name or value found in material description
- dynamodb_encryption_sdk.internal.formatting.material_description.deserialize(serialized_material_description: Dict[str, ByteString]) Dict[str, str] [source]
Deserialize a serialized material description attribute into a material description dictionary.
- Parameters
serialized_material_description (dict) – DynamoDB attribute value containing serialized material description.
- Returns
Material description dictionary
- Return type
- Raises
InvalidMaterialDescriptionError – if malformed version
InvalidMaterialDescriptionVersionError – if unknown version is found