Chained¶
cachetory.serializers.ChainedSerializer ¶
Sequentially applies the chain of serializers. It allows defining multiple steps of serialization.
Source code in cachetory/serializers/chained.py
from_url
classmethod
¶
Construct serializer from the URL.
This method parses the URL and constructs serializer layers based on the schema's and query parameters.
Examples:
>>> serializer = ChainedSerializer.from_url(
>>> # Serialize with Pickle and then compress with Zstandard:
>>> "pickle+zstd://?pickle-protocol=4&compression-level=3",
>>> )
Source code in cachetory/serializers/chained.py
__init__ ¶
Initialize the chained serializer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
layers
|
Iterable[Serializer[ValueT, WireT]]
|
iterable of other serializers which are then applied sequentially |
required |