Skip to content

data_writer

Classes:

Name Description
DataWriter

Classes#

DataWriter #

Bases: ParameterizedClass, ABC


Base class for writing data to storage area(s).


Methods:

Name Description
write

Functions#

write abstractmethod #
write(dataset: xr.Dataset, **kwargs: Any) -> None

Writes the dataset to the storage area.

This method is typically called by the tsdat storage API, which will be responsible for providing any additional parameters required by subclasses of the tsdat.io.base.DataWriter class.

Parameters:

Name Type Description Default
dataset Dataset

The dataset to save.

required

Source code in tsdat/io/base/data_writer.py
@abstractmethod
def write(self, dataset: xr.Dataset, **kwargs: Any) -> None:
    """-----------------------------------------------------------------------------
    Writes the dataset to the storage area.

    This method is typically called by the tsdat storage API, which will be
    responsible for providing any additional parameters required by subclasses of
    the tsdat.io.base.DataWriter class.

    Args:
        dataset (xr.Dataset): The dataset to save.

    -----------------------------------------------------------------------------"""
    ...