Skip to content

file_handler

Classes:

Name Description
FileHandler

DataHandler specifically tailored to reading and writing files of a specific type.

Classes#

FileHandler #

Bases: DataHandler

DataHandler specifically tailored to reading and writing files of a specific type.

Methods:

Name Description
no_leading_dot

Attributes:

Name Type Description
extension str

The specific file extension used for data files, e.g., ".nc".

reader DataReader

The DataReader subclass responsible for reading input data.

writer FileWriter

The FileWriter subclass responsible for writing output data.

Attributes#

extension instance-attribute #
extension: str

The specific file extension used for data files, e.g., ".nc".

reader instance-attribute #
reader: DataReader

The DataReader subclass responsible for reading input data.

writer instance-attribute #
writer: FileWriter

The FileWriter subclass responsible for writing output data.

Functions#

no_leading_dot #
no_leading_dot(v: str, values: Dict[str, Any]) -> str
Source code in tsdat/io/base/file_handler.py
@validator("extension", pre=True)
def no_leading_dot(cls, v: str, values: Dict[str, Any]) -> str:
    return v.lstrip(".")