]> git.madduck.net Git - etc/taskwarrior.git/blob - tasklib/backends.py

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

1bebafdc1575eaf4a4c448192a622984505aa62b
[etc/taskwarrior.git] / tasklib / backends.py
1 import abc
2
3 class Backend(object):
4
5     @abc.abstractmethod
6     def filter_tasks(self, filter_obj):
7         """Returns a list of Task objects matching the given filter"""
8         pass
9
10     @abc.abstractmethod
11     def save_task(self, task):
12         pass
13
14     @abc.abstractmethod
15     def delete_task(self, task):
16         pass
17
18     @abc.abstractmethod
19     def start_task(self, task):
20         pass
21
22     @abc.abstractmethod
23     def stop_task(self, task):
24         pass
25
26     @abc.abstractmethod
27     def sync(self):
28         """Syncs the backend database with the taskd server"""
29         pass