]> 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:

c835dc2a6fb5ef0b3577b6df598c9fb1d81a2df1
[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 tasklib is a Python library for interacting with taskwarrior_ databases, using
8 a queryset 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 or 2.3.0 beta2.
11 Older versions of taskwarrior are untested and probably won't work.
12
13 Requirements
14 ------------
15
16 * taskwarrior_ v2.2.0 or v2.3.0 beta2
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 For more advanced usage, see the documentation_.
48
49 .. _taskwarrior: http://taskwarrior.org
50 .. _documentation: http://tasklib.readthedocs.org/en/latest/