{"id":16139528,"url":"https://github.com/bergercookie/taskw-ng","last_synced_at":"2025-03-18T16:31:12.241Z","repository":{"id":78140235,"uuid":"180464806","full_name":"bergercookie/taskw-ng","owner":"bergercookie","description":"Next Generation Taskwarrior Python API","archived":false,"fork":false,"pushed_at":"2024-08-10T10:22:52.000Z","size":539,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-16T22:02:32.061Z","etag":null,"topics":["python","python3","taskmanagement","taskwarrior"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/taskw-ng","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"ralphbean/taskw","license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bergercookie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-09T23:32:26.000Z","updated_at":"2025-03-06T23:48:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"762a0b33-2698-4f65-890f-ce90df103fbf","html_url":"https://github.com/bergercookie/taskw-ng","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergercookie%2Ftaskw-ng","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergercookie%2Ftaskw-ng/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergercookie%2Ftaskw-ng/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergercookie%2Ftaskw-ng/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bergercookie","download_url":"https://codeload.github.com/bergercookie/taskw-ng/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244259923,"owners_count":20424638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","python3","taskmanagement","taskwarrior"],"created_at":"2024-10-09T23:49:15.870Z","updated_at":"2025-03-18T16:31:11.867Z","avatar_url":"https://github.com/bergercookie.png","language":"Python","readme":"# `taskw-ng` - Python API for the Taskwarrior DB\n\n\u003e This project is a continuation of the [taskw python\nwrapper](https://github.com/ralphbean/taskw).\n\nThis is a python API for the [Taskwarrior](http://taskwarrior.org) command line\ntask manager. It supports interacting with Taskwarirrior version \u003e= `2.5`.\n\n## Getting `taskw-ng`\n\n### Installing\n\nUsing `taskw-ng` requires that you first install [Taskwarrior](http://taskwarrior.org).\n\nInstalling it from http://pypi.org/project/taskw-ng is easy with `pip`:\n\n```sh\npip install taskw-ng\n```\n\n## Examples\n\n### Looking at tasks\n\n```python\nfrom taskw_ng import TaskWarrior\nw = TaskWarrior()\ntasks = w.load_tasks()\ntasks.keys()\n# ['completed', 'pending']\ntype(tasks['pending'])\n# \u003ctype 'list'\u003e\ntype(tasks['pending'][0])\n# \u003ctype 'dict'\u003e\n```\n\n### Adding tasks\n\n```python\nfrom taskw_ng import TaskWarrior\nw = TaskWarrior()\nw.task_add(\"Eat food\")\nw.task_add(\"Take a nap\", priority=\"H\", project=\"life\", due=\"1359090000\")\n```\n\n### Retrieving tasks\n\n```python\nfrom taskw_ng import TaskWarrior\nw = TaskWarrior()\nw.get_task(id=5)\n```\n\n### Updating tasks\n\n```python\nfrom taskw_ng import TaskWarrior\nw = TaskWarrior()\nid, task = w.get_task(id=14)\ntask['project'] = 'Updated project name'\nw.task_update(task)\n```\n\n### Deleting tasks\n\n```python\nfrom taskw_ng import TaskWarrior\nw = TaskWarrior()\nw.task_delete(id=3)\n```\n\n### Completing tasks\n\n```python\nfrom taskw_ng import TaskWarrior\nw = TaskWarrior()\nw.task_done(id=46)\n```\n\n### Being Flexible\n\nYou can point `taskw-ng` at different Taskwarrior databases.\n\n```python\nfrom taskw_ng import TaskWarrior\nw = TaskWarrior(config_filename=\"~/some_project/.taskrc\")\nw.task_add(\"Use taskw_ng.\")\n```\n\n### Looking at the config\n\n```python\nfrom taskw_ng import TaskWarrior\nw = TaskWarrior()\nconfig = w.load_config()\nconfig['data']['location']\n# '/home/threebean/.task'\nconfig['_forcecolor']\n# 'yes'\n```\n\n### Using python-appropriate types (dates, UUIDs, etc)\n\n```python\nfrom taskw_ng import TaskWarrior\nw = TaskWarrior(marshal=True)\nw.get_task(id=10)\n# should give the following:\n# (10,\n#  {\n#   'description': 'Hello there!',\n#   'entry': datetime.datetime(2014, 3, 14, 14, 18, 40, tzinfo=tzutc())\n#   'id': 10,\n#   'project': 'Saying Hello',\n#   'status': 'pending',\n#   'uuid': UUID('4882751a-3966-4439-9675-948b1152895c')\n#  }\n# )\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbergercookie%2Ftaskw-ng","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbergercookie%2Ftaskw-ng","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbergercookie%2Ftaskw-ng/lists"}