encrypted#

Implement Client Side Encryption Attribute for Unicode, Binary, Numbers and Json data.

class pynamodb_mate.attributes.encrypted.SymmetricEncryptedAttribute(encryption_key: str, determinative: bool = True, hash_key: bool = False, range_key: bool = False, null: Optional[bool] = None, default: Optional[Callable] = None, default_for_new: Optional[Callable] = None, attr_name: Optional[str] = None)[source]#
SymmetricEncryptedAttribute will encrypt your data in binary format

before sending to DynamoDB.

property cipher: BaseCipher#
Return type:

SymmtricCipher

user_serializer(value: Any) bytes[source]#

Implement this method to define how you want to convert your data to binary.

user_deserializer(value: bytes) Any[source]#

Implement this method to define how you want to recover your data from binary.

serialize(value: Any) bytes[source]#

Returns a base64 encoded binary string

deserialize(value: bytes) Any[source]#

Returns a decoded byte string from a base64 encoded value

class pynamodb_mate.attributes.encrypted.EncryptedUnicodeAttribute(encryption_key: str, determinative: bool = True, hash_key: bool = False, range_key: bool = False, null: Optional[bool] = None, default: Optional[Callable] = None, default_for_new: Optional[Callable] = None, attr_name: Optional[str] = None)[source]#

Encrypted Unicode Attribute.

user_serializer(value: str) bytes[source]#

Implement this method to define how you want to convert your data to binary.

user_deserializer(value: bytes) str[source]#

Implement this method to define how you want to recover your data from binary.

class pynamodb_mate.attributes.encrypted.EncryptedBinaryAttribute(encryption_key: str, determinative: bool = True, hash_key: bool = False, range_key: bool = False, null: Optional[bool] = None, default: Optional[Callable] = None, default_for_new: Optional[Callable] = None, attr_name: Optional[str] = None)[source]#
user_serializer(value: bytes) bytes[source]#

Implement this method to define how you want to convert your data to binary.

user_deserializer(value: bytes) bytes[source]#

Implement this method to define how you want to recover your data from binary.

class pynamodb_mate.attributes.encrypted.EncryptedNumberAttribute(encryption_key: str, determinative: bool = True, hash_key: bool = False, range_key: bool = False, null: Optional[bool] = None, default: Optional[Callable] = None, default_for_new: Optional[Callable] = None, attr_name: Optional[str] = None)[source]#

Encrypted Number Attribute.

user_serializer(value: Union[int, float]) bytes[source]#

Implement this method to define how you want to convert your data to binary.

user_deserializer(value: bytes) Union[int, float][source]#

Implement this method to define how you want to recover your data from binary.

class pynamodb_mate.attributes.encrypted.EncryptedJsonDictAttribute(encryption_key: str, determinative: bool = True, hash_key: bool = False, range_key: bool = False, null: Optional[bool] = None, default: Optional[Callable] = None, default_for_new: Optional[Callable] = None, attr_name: Optional[str] = None)[source]#

Encrypted JSON data Attribute.

user_serializer(value: dict) bytes[source]#

Implement this method to define how you want to convert your data to binary.

user_deserializer(value: bytes) dict[source]#

Implement this method to define how you want to recover your data from binary.