asphalt.serialization.serializers.yaml
- class asphalt.serialization.serializers.yaml.YAMLSerializer(safe=True)
Bases:
Serializer
Serializes objects to and from YAML format.
To use this serializer backend, the
ruamel.yaml
library must be installed. A convenient way to do this is to installasphalt-serialization
with theyaml
extra:$ pip install asphalt-serialization[yaml]
Warning
This serializer is insecure in unsafe mode because it allows execution of arbitrary code when deserializing.
See also
- Parameters:
safe (
bool
) –True
to (de)serialize in safe mode,False
to enable extended tags