Skip to content

Repository

FileSystemRepository dataclass

Bases: MetricRepository

Represents a FileSystem metric Repository in tsumugi.

Source code in tsumugi-python/tsumugi/repository.py
@dataclass
class FileSystemRepository(MetricRepository):
    """Represents a FileSystem metric Repository in tsumugi."""

    path: str

    def _to_proto(self) -> proto.Repository:
        return proto.Repository(
            file_system=proto.FileSystemRepository(
                path=self.path,
            )
        )

MetricRepository

Bases: ABC

Abstract class for all metric repository in tsumugi.

Source code in tsumugi-python/tsumugi/repository.py
class MetricRepository(ABC):
    """Abstract class for all metric repository in tsumugi."""

    @abstractmethod
    def _to_proto(self) -> proto.Repository: ...

SparkTableRepository dataclass

Bases: MetricRepository

Represents a spark table metric repository in tsumugi.

Source code in tsumugi-python/tsumugi/repository.py
@dataclass
class SparkTableRepository(MetricRepository):
    """Represents a spark table metric repository in tsumugi."""

    table_name: str

    def _to_proto(self) -> proto.Repository:
        return proto.Repository(
            spark_table=proto.SparkTableRepository(
                table_name=self.table_name,
            )
        )