Skip to main content

SaverDefault

ClassAbstractSource

SaverDefault()

This is an abstract class requiring further implementation.

The default implementation of the file saver. It can be overriden if special customization is required.

Arguments

Initialization function is not specified.

Methods

save_bytes

self.save_bytes(file_path: str | PathLike[str], data: bytes)

Save the binary data.

Requires

NameTypeRequired
Description
file_pathstr | PathLike[str]The path to the output file.
databytesThe byte data to be saved.

save_data

self.save_data(file_path: str | PathLike[str], data: Any)

Save the structured data (such as json).

Requires

NameTypeRequired
Description
file_pathstr | PathLike[str]The path to the output file.
dataAnyThe structured data to be saved.

save_text

self.save_text(file_path: str | PathLike[str], data: str)

Save the text file.

Requires

NameTypeRequired
Description
file_pathstr | PathLike[str]The path to the output file.
datastrThe text data to be saved.