nannyml.io.file_writer module¶
- class nannyml.io.file_writer.FileWriter(path: str, write_args: Optional[Dict[str, Any]] = None, credentials: Optional[Dict[str, Any]] = None, fs_args: Optional[Dict[str, Any]] = None)[source]¶
Bases:
nannyml.io.base.Writer
,abc.ABC
An abstract Writer implementation that writes results out to a filesystem (either local or remote / cloud).
This abstract base class provides a helper
_write_bytes_to_filesystem
function that helps to implement the abstract_write
function.Creates a new FileWriter
- Parameters
path (str) – The path to read data from. Can be a regular file path or contain a protocol.
write_args (Dict[str, Any]) – Specific arguments passed along the method performing the actual writing.
credentials (Dict[str, Any]) – Used to provide credential information following specific
fsspec
implementations.fs_args – Specific arguments passed along to the
fsspec
filesystem initializer.