]> git.madduck.net Git - etc/taskwarrior.git/blob - README.rst

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:

a5dcfe56122d59dcde47bab172d4060d8167e4f2
[etc/taskwarrior.git] / README.rst
1 tasklib
2 =======
3
4 .. image:: https://travis-ci.org/robgolding63/tasklib.png
5     :target: http://travis-ci.org/robgolding63/tasklib
6
7 A Python library for interacting with taskwarrior_ databases, using a queryset
8 API similar to that of Django's ORM.
9
10 Supports Python 2.6, 2.7, 3.2 and 3.3 with taskwarrior 2.2.0. Older versions of
11 taskwarrior are untested and probably won't work.
12
13 Requirements
14 ------------
15
16 * taskwarrior_ v2.2.0
17
18 Installation
19 ------------
20
21 Install via pip::
22
23     pip install tasklib
24
25 Usage
26 -----
27
28 tasklib has a similar API to that of Django's ORM::
29
30     >>> from tasklib.task import TaskWarrior
31
32     >>> tw = TaskWarrior('/home/rob/.task')
33     >>> tasks = tw.tasks.pending()
34     >>> tasks
35     ['Tidy the house', 'Learn German']
36     >>> tasks.filter(tags__contain='chores')
37     ['Tidy the house']
38     >>> type(tasks[0])
39     <class 'tasklib.task.Task'>
40     >>> task[0].done()
41     >>> tasks = tw.tasks.pending()
42     >>> tasks
43     ['Learn German']
44     >>> tasks[0]['tags'] = ['languages']
45     >>> tasks[0].save()
46
47 .. _taskwarrior: http://taskwarrior.org