class str, format: str, write_args: Dict[str, Any] | None = None, credentials: Dict[str, Any] | None = None, fs_args: Dict[str, Any] | None = None)[source]

Bases: FileWriter

A Writer implementation that dumps the Result contents (data and plots) on disk (local/remote/cloud).

Creates a new RawFilesWriter instance

  • path (str) – The directory to write the results in. Each Result being written there will end create its own subdirectory. Each of those will contain data and plots subdirectories.

  • format (str) – The file format for the data export. Should be one of parquet or csv.

  • 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.


>>> writer = RawFilesWriter(path='/output', format="parquet")
>>> # plots is a Dictionary mapping a plot name to a plotly Figure
>>> # this is some legacy stuff to be cleaned up
>>> writer.write(result, plots={}, calculator_name='test')