Source code for qimchi.components.data.base

from pathlib import Path
from abc import ABC, abstractmethod
from dash import html


[docs] class Database(ABC): def __init__(self, path: Path) -> None: """ Base class for database folders in Qimchi """ super().__init__() self.path = path
[docs] @abstractmethod def options(self): """ Returns the options for the data selector for current database type """
[docs] def selector(self) -> html.Div: """ Returns the data selector component Returns: html.Div: The data selector component """ return html.Div( [ self.options(), ], **{"data-theme": "light"}, )
[docs] class Data(ABC): def __init__(self, path: Path) -> None: """ Base class for data files in Qimchi """ super().__init__() self.path = path