whylogs.api.writer.local#

Module Contents#

Classes#

LocalWriter

Writes Writable to local files. By default, this just returns the files created in the

Attributes#

whylogs.api.writer.local.logger#
class whylogs.api.writer.local.LocalWriter(base_dir: Optional[str] = None, base_name: Optional[str] = None)#

Bases: whylogs.api.writer.Writer

Writes Writable to local files. By default, this just returns the files created in the current working directory by the Writable itself. This can be overriden by specifying base_dir or base_name via the constructor or option().

The Writable optionally can be written to a ZipFile.

Parameters
  • base_dir (Optional[str]) –

  • base_name (Optional[str]) –

write(file: whylogs.api.writer.writer.Writable, dest: Optional[str] = None, **kwargs: Any) Tuple[bool, Union[str, List[Tuple[bool, str]]]]#
kwargs:

base_dir: str Directory to write to base_name: str File name to write to zip: bool Create a ZipFile containing the Writable’s file(s) if the Writer supports it zip_name: str Name of the ZipFile, will be auto-generated if None

Parameters
Return type

Tuple[bool, Union[str, List[Tuple[bool, str]]]]

option(**kwargs: Any) whylogs.api.writer.Writer#

base_dir: str Directory to write to base_name: str File name to write to

Parameters

kwargs (Any) –

Return type

whylogs.api.writer.Writer

check_interval(interval_seconds: int) None#

Validate an interval configuration for a given writer.

Some writers only accepts certain interval configuration. Raise BadConfigError for an unacceptable interval.

Parameters

interval_seconds (int) –

Return type

None