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

ReadOnlyDictView: Do not use explicit u literals
[etc/taskwarrior.git] / README.rst
1 tasklib
2 =======
3
4 .. image:: https://travis-ci.org/robgolding63/tasklib.png?branch=develop
5     :target: http://travis-ci.org/robgolding63/tasklib
6
7 .. image:: https://coveralls.io/repos/robgolding63/tasklib/badge.png?branch=develop
8     :target: https://coveralls.io/r/robgolding63/tasklib?branch=develop
9
10 tasklib is a Python library for interacting with taskwarrior_ databases, using
11 a queryset API similar to that of Django's ORM.
12
13 Supports Python 2.6, 2.7, 3.2, 3.3 and 3.4 with taskwarrior 2.1.x and above.
14 Older versions of taskwarrior are untested and may not work.
15
16 Requirements
17 ------------
18
19 * taskwarrior_ v2.1.x or above.
20
21 Installation
22 ------------
23
24 Install via pip::
25
26     pip install tasklib
27
28 Usage
29 -----
30
31 tasklib has a similar API to that of Django's ORM::
32
33     >>> from tasklib.task import TaskWarrior
34
35     >>> tw = TaskWarrior('/home/rob/.task')
36     >>> tasks = tw.tasks.pending()
37     >>> tasks
38     ['Tidy the house', 'Learn German']
39     >>> tasks.filter(tags__contain='chores')
40     ['Tidy the house']
41     >>> type(tasks[0])
42     <class 'tasklib.task.Task'>
43     >>> task[0].done()
44     >>> tasks = tw.tasks.pending()
45     >>> tasks
46     ['Learn German']
47     >>> tasks[0]['tags'] = ['languages']
48     >>> tasks[0].save()
49
50 For more advanced usage, see the documentation_.
51
52 .. _taskwarrior: http://taskwarrior.org
53 .. _documentation: http://tasklib.readthedocs.org/en/latest/