model.py 452 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from abc import ABC
from dataclasses import dataclass


@dataclass(frozen=True)
class Interval:
    start: int = 0
    end: int = 0


class Track(ABC):
    def extract(self, an_interval: Interval) -> "Track":
        raise NotImplementedError()


class Tracks(ABC):
    def __getitem__(self, a_path: str) -> Track:
        raise NotImplementedError()

    def __setitem__(self, a_path: str, a_track: Track) -> None:
        raise NotImplementedError()