compressed#
Auto-compress and decompress data in DynamoDB.
- class pynamodb_mate.attributes.compressed.CompressedAttribute(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, legacy_encoding: bool = False)[source]#
CompressedAttribute will serialize the original data to binary format, and compress it before sending to DynamoDB.
- 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]#
Serializes a value for botocore’s DynamoDB client.
For a list of DynamoDB attribute types and their matching botocore Python types, see DynamoDB.Client.get_item API reference.
- deserialize(value: bytes) Any[source]#
Deserializes a value from botocore’s DynamoDB client.
For a list of DynamoDB attribute types and their matching botocore Python types, see DynamoDB.Client.get_item API reference.
- class pynamodb_mate.attributes.compressed.CompressedBinaryAttribute(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, legacy_encoding: bool = False)[source]#
A compressed binary Attribute.
- class pynamodb_mate.attributes.compressed.CompressedUnicodeAttribute(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, legacy_encoding: bool = False)[source]#
A compressed unicode Attribute.
- class pynamodb_mate.attributes.compressed.CompressedJSONDictAttribute(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, legacy_encoding: bool = False)[source]#
A compressed JSON dict Attribute.