Skip to main content
http://secure.travis-ci.org/ralphbean/taskw.png

This is a python API for the taskwarrior command line tool.

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.0.tar.gz (18.2 kB view details)

Uploaded Source

File details

Details for the file taskw-0.4.0.tar.gz.

File metadata

  • Download URL: taskw-0.4.0.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for taskw-0.4.0.tar.gz
Algorithm Hash digest
SHA256 6a1792f647b0de743dc4b92a827f0d5a558b0380beefce5b200a0c3e0037e764
MD5 035c7141630656985cbe9d8faef32977
BLAKE2b-256 c13c9c5ceb98c7e70dcf76849ddf373d26696662c87517db7434737465f6144c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page