omnipy.components.raw.serializers
Tar-file serializers for raw string and bytes datasets.
| CLASS | DESCRIPTION |
|---|---|
RawBytesDatasetToTarFileSerializer |
Serialize raw bytes datasets to and from gzipped tar archives. |
RawStrDatasetToTarFileSerializer |
Serialize raw string datasets to and from gzipped tar archives. |
RawBytesDatasetToTarFileSerializer
Bases: TarFileSerializer[StrictBytesDataset]
flowchart BT
omnipy.components.raw.serializers.RawBytesDatasetToTarFileSerializer[RawBytesDatasetToTarFileSerializer]
omnipy.data.serializer.TarFileSerializer[TarFileSerializer]
omnipy.data.serializer.Serializer[Serializer]
omnipy.data.serializer.TarFileSerializer --> omnipy.components.raw.serializers.RawBytesDatasetToTarFileSerializer
omnipy.data.serializer.Serializer --> omnipy.data.serializer.TarFileSerializer
click omnipy.components.raw.serializers.RawBytesDatasetToTarFileSerializer href "" "omnipy.components.raw.serializers.RawBytesDatasetToTarFileSerializer"
click omnipy.data.serializer.TarFileSerializer href "" "omnipy.data.serializer.TarFileSerializer"
click omnipy.data.serializer.Serializer href "" "omnipy.data.serializer.Serializer"
Serialize raw bytes 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 stores raw bytes. |
serialize |
Serialize a dataset into a gzipped tar archive. |
Source code in src/omnipy/components/raw/serializers.py
deserialize
classmethod
deserialize(serialized: bytes, any_file_suffix=False) -> StrictBytesDataset
Deserialize a gzipped tar archive back into a dataset.
Source code in src/omnipy/components/raw/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/raw/serializers.py
get_output_file_suffix
classmethod
Return the file suffix used for serialized dataset members.
Source code in src/omnipy/components/raw/serializers.py
is_dataset_directly_supported
classmethod
is_dataset_directly_supported(dataset: IsDataset) -> bool
Return whether a dataset stores raw bytes.
Source code in src/omnipy/components/raw/serializers.py
serialize
classmethod
serialize(dataset: StrictBytesDataset) -> bytes | memoryview
Serialize a dataset into a gzipped tar archive.
Source code in src/omnipy/components/raw/serializers.py
RawStrDatasetToTarFileSerializer
Bases: TarFileSerializer[StrictStrDataset]
flowchart BT
omnipy.components.raw.serializers.RawStrDatasetToTarFileSerializer[RawStrDatasetToTarFileSerializer]
omnipy.data.serializer.TarFileSerializer[TarFileSerializer]
omnipy.data.serializer.Serializer[Serializer]
omnipy.data.serializer.TarFileSerializer --> omnipy.components.raw.serializers.RawStrDatasetToTarFileSerializer
omnipy.data.serializer.Serializer --> omnipy.data.serializer.TarFileSerializer
click omnipy.components.raw.serializers.RawStrDatasetToTarFileSerializer href "" "omnipy.components.raw.serializers.RawStrDatasetToTarFileSerializer"
click omnipy.data.serializer.TarFileSerializer href "" "omnipy.data.serializer.TarFileSerializer"
click omnipy.data.serializer.Serializer href "" "omnipy.data.serializer.Serializer"
Serialize raw string 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 stores raw strings. |
serialize |
Serialize a dataset into a gzipped tar archive. |
Source code in src/omnipy/components/raw/serializers.py
deserialize
classmethod
deserialize(serialized: bytes, any_file_suffix=False) -> StrictStrDataset
Deserialize a gzipped tar archive back into a dataset.
Source code in src/omnipy/components/raw/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/raw/serializers.py
get_output_file_suffix
classmethod
Return the file suffix used for serialized dataset members.
Source code in src/omnipy/components/raw/serializers.py
is_dataset_directly_supported
classmethod
is_dataset_directly_supported(dataset: IsDataset) -> bool
Return whether a dataset stores raw strings.
Source code in src/omnipy/components/raw/serializers.py
serialize
classmethod
serialize(dataset: StrictStrDataset) -> bytes | memoryview
Serialize a dataset into a gzipped tar archive.