omnipy.components.json.serializers
Tar-file serializer for Omnipy JSON datasets.
| CLASS | DESCRIPTION |
|---|---|
JsonDatasetToTarFileSerializer |
Serialize JSON datasets to and from gzipped tar archives. |
JsonDatasetToTarFileSerializer
Bases: TarFileSerializer[JsonBaseDataset]
flowchart BT
omnipy.components.json.serializers.JsonDatasetToTarFileSerializer[JsonDatasetToTarFileSerializer]
omnipy.data.serializer.TarFileSerializer[TarFileSerializer]
omnipy.data.serializer.Serializer[Serializer]
omnipy.data.serializer.TarFileSerializer --> omnipy.components.json.serializers.JsonDatasetToTarFileSerializer
omnipy.data.serializer.Serializer --> omnipy.data.serializer.TarFileSerializer
click omnipy.components.json.serializers.JsonDatasetToTarFileSerializer href "" "omnipy.components.json.serializers.JsonDatasetToTarFileSerializer"
click omnipy.data.serializer.TarFileSerializer href "" "omnipy.data.serializer.TarFileSerializer"
click omnipy.data.serializer.Serializer href "" "omnipy.data.serializer.Serializer"
Serialize JSON datasets to and from gzipped tar archives.
| METHOD | DESCRIPTION |
|---|---|
deserialize |
Deserialize a gzipped tar archive back into a dataset. |
get_dataset_cls_for_new |
Return the dataset class created during deserialization. |
get_output_file_suffix |
Return the file suffix used for serialized dataset members. |
is_dataset_directly_supported |
Return whether a dataset can be serialized as JSON files. |
serialize |
Serialize a dataset into a gzipped tar archive. |
Source code in src/omnipy/components/json/serializers.py
deserialize
classmethod
deserialize(serialized: bytes, any_file_suffix=False) -> JsonDataset
Deserialize a gzipped tar archive back into a dataset.
Source code in src/omnipy/components/json/serializers.py
get_dataset_cls_for_new
classmethod
get_dataset_cls_for_new() -> Type[IsDataset]
Return the dataset class created during deserialization.
Source code in src/omnipy/components/json/serializers.py
get_output_file_suffix
classmethod
Return the file suffix used for serialized dataset members.
Source code in src/omnipy/components/json/serializers.py
is_dataset_directly_supported
classmethod
is_dataset_directly_supported(dataset: IsDataset) -> bool
Return whether a dataset can be serialized as JSON files.
Source code in src/omnipy/components/json/serializers.py
serialize
classmethod
serialize(dataset: JsonBaseDataset) -> bytes | memoryview
Serialize a dataset into a gzipped tar archive.