Serializers
ImageSerializer
Bases: SerializerBase
Pillow image serializer.
Source code in lume_services/files/serializers/image.py
5 6 7 8 9 10 11 12 13 14 |
|
YAMLSerializer
Bases: SerializerBase
Serializer sublass handling YAML files.
Source code in lume_services/files/serializers/yaml.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
deserialize(filename)
classmethod
Deserializes a given YAML file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filename
|
str
|
Name of file to deserialize. |
required |
Returns:
Type | Description |
---|---|
List[dict]
|
List[dict]: Loaded YAML representation. |
Source code in lume_services/files/serializers/yaml.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
serialize(filename, object)
Serialize an object to a YAML.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filename
|
str
|
Name of file to write. |
required |
object
|
List[dict]
|
Object to serialize. |
required |
Source code in lume_services/files/serializers/yaml.py
12 13 14 15 16 17 18 19 20 21 22 23 |
|