TorrentUplouderBot/tubot/dirgetter/abc.py

33 lines
778 B
Python

# -*- coding: utf-8 -*-
############################################
# Directory-Getter module abstract classes #
############################################
# Imports
from abc import ABC, abstractmethod
from tubot.static.abc import IValidatable
from tubot.dirgetter.types import GetterTypes
class DirGetter(IValidatable, ABC):
"""
DirectoryGetter Abstract class
"""
_gtype: GetterTypes
def __init__(self) -> None:
if self._gtype is None:
raise NotImplementedError("DirGetter type is not implemented")
@property
@abstractmethod
async def folders(self) -> dict:
"""
Returns a dictionary of media folders {name: path}
:return: Dict of media folders
"""
raise NotImplementedError