import abc class Backend(object): @abc.abstractmethod def filter_tasks(self, filter_obj): """Returns a list of Task objects matching the given filter""" pass @abc.abstractmethod def save_task(self, task): pass @abc.abstractmethod def delete_task(self, task): pass @abc.abstractmethod def start_task(self, task): pass @abc.abstractmethod def stop_task(self, task): pass @abc.abstractmethod def sync(self): """Syncs the backend database with the taskd server""" pass