This is a python API for the taskwarrior command line tool.
Build Status
Branch |
Status |
|---|---|
master |
|
develop |
Getting taskw
Installing
Using taskw requires that you first install taskwarrior.
Installing it from http://pypi.python.org/pypi/taskw is easy with pip:
$ pip install taskw
The Source
You can find the source on github at http://github.com/ralphbean/taskw
Examples
Looking at tasks
>>> from taskw import TaskWarrior >>> w = TaskWarrior() >>> tasks = w.load_tasks() >>> tasks.keys() ['completed', 'pending'] >>> type(tasks['pending']) <type 'list'> >>> type(tasks['pending'][0]) <type 'dict'>
Adding tasks
>>> from taskw import TaskWarrior
>>> w = TaskWarrior()
>>> w.task_add("Eat food")
>>> w.task_add("Take a nap", priority="H", project="life")
Completing tasks
>>> from taskw import TaskWarrior >>> w = TaskWarrior() >>> w.task_done(46)
Being Flexible
You can point taskw at different taskwarrior databases.
>>> from taskw import TaskWarrior
>>> w = TaskWarrior(config_filename="~/some_project/.taskrc")
>>> w.task_add("Use 'taskw'.")
Looking at the config
>>> from taskw import TaskWarrior >>> w = TaskWarrior() >>> config = w.load_config() >>> config['data']['location'] '/home/threebean/.task' >>> config['_forcecolor'] 'yes'
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
taskw-0.4.4.tar.gz
(18.2 kB
view details)
File details
Details for the file taskw-0.4.4.tar.gz.
File metadata
- Download URL: taskw-0.4.4.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f21eaebc0d91c6fbe1743a4c7fd4af7c1c4a3ad765d84b38ac44f2592c8e3f89
|
|
| MD5 |
388afa09e9d8d1cf77843bb765a01491
|
|
| BLAKE2b-256 |
6d527d44546d95ef5aba556000d8b8c267fa1b8d712a02d811cec63bf8e68273
|