Source code for elasticai.creator.file_generation.savable

from abc import abstractmethod
from typing import Protocol

from .template import Template


[docs] class File(Protocol):
[docs] @abstractmethod def write(self, template: Template) -> None: ...
[docs] class Path(Protocol):
[docs] @abstractmethod def as_file(self, suffix: str) -> File: ...
[docs] @abstractmethod def create_subpath(self, subpath_name: str) -> "Path": ...
[docs] class Savable(Protocol):
[docs] @abstractmethod def save_to(self, destination: Path) -> None: ...