Response serialization utilities. See Serializers for general usage info.
cattrs library includes a number of pre-configured converters that perform some pre-serialization steps
required for specific serialization formats.
requests_cache.serializers.preconf wraps those converters as serializer
Stage objects, which are then combined into a
converters run after the base converter and before the format’s
dumps() (or equivalent) method.
For example, for JSON:
Run json prconf converter to convert binary response body to base84
For any optional libraries that aren’t installed, the corresponding serializer will be a placeholder
class that raises an
ImportError at initialization time instead of at import time.