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

Attributes#

extension instance-attribute #
extension: str

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

Methods:#

no_leading_dot classmethod #
no_leading_dot(v: str, values: Dict[str, Any]) -> str
Source code in tsdat/io/base/file_handler.py
@field_validator("extension", mode="before")  # type: ignore
@classmethod
def no_leading_dot(cls, v: str, values: Dict[str, Any]) -> str:
    return v.lstrip(".")