Skip to main content

Taskwarrior wrapper python module

Project description

pytaskwarrior

Python 3.9+ License: MIT Code style: ruff Tests PyPI version

A modern Python library for TaskWarrior v3.x task management.

No task binary required. pytaskwarrior uses taskchampion3-py-dev — Rust bindings to the taskchampion storage engine — for direct, high-performance SQLite access.

Features

  • No external binary — reads/writes TaskWarrior's SQLite database directly
  • Full CRUD operations — Create, read, update, delete tasks
  • Type-safe — Pydantic models with full type hints
  • Context management — Define, apply, and switch contexts (reads/writes .taskrc)
  • UDA support — User Defined Attributes
  • Virtual tags+OVERDUE, +DUE, +TODAY, +WEEK, +BLOCKED, +READY, and 20+ more
  • Date expressionsdue.before:tomorrow, due.after:eom, compound expressions (now + P3D)
  • Recurring tasks — Full recurrence support
  • Annotations — Add notes to tasks
  • Sync — Remote and local directory sync via taskchampion protocol
  • Optional CLI fallback — Pass task_cmd="task" to use the classic CLI adapter

Requirements

  • Python 3.9+
  • taskchampion3-py-dev >= 3.0.1.3 (installed automatically)

The task binary is not required for the default adapter.

Installation

pip install pytaskwarrior

Quick Start

from taskwarrior import TaskWarrior, TaskInputDTO, Priority

# No binary needed — uses taskchampion SQLite backend directly
tw = TaskWarrior()

# Create a task
task = tw.add_task(TaskInputDTO(
    description="Finish project report",
    priority=Priority.HIGH,
    project="work",
    tags=["urgent"],
    due="friday",
))

# Query tasks
for t in tw.get_tasks("project:work +READY"):
    print(f"[{t.priority or '-'}] {t.description}")

# Virtual tag filtering
overdue = tw.get_tasks("+OVERDUE")
due_soon = tw.get_tasks("due.before:eow")

# Complete a task
tw.done_task(task.uuid)

Documentation

Full documentation: GitHub Repository

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytaskwarrior-3.0.0rc3.tar.gz (49.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytaskwarrior-3.0.0rc3-py3-none-any.whl (58.1 kB view details)

Uploaded Python 3

File details

Details for the file pytaskwarrior-3.0.0rc3.tar.gz.

File metadata

  • Download URL: pytaskwarrior-3.0.0rc3.tar.gz
  • Upload date:
  • Size: 49.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pytaskwarrior-3.0.0rc3.tar.gz
Algorithm Hash digest
SHA256 73c3f84109f985ed04883161bb1fd4db3ab9ad75100d85880dcb266343b15210
MD5 4e7fc830067d6d7919864d72394989b7
BLAKE2b-256 85b95877974f0f77efb390fa0b23d66e4bd94d2d4e463621cac2d6aebf62b9b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytaskwarrior-3.0.0rc3.tar.gz:

Publisher: release.yml on sznicolas/pytaskwarrior

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytaskwarrior-3.0.0rc3-py3-none-any.whl.

File metadata

File hashes

Hashes for pytaskwarrior-3.0.0rc3-py3-none-any.whl
Algorithm Hash digest
SHA256 00e294fb89fe3c312f52c2befdbff2703630f254f3d146789a4681e88046e275
MD5 700f6ef2b509e2bad1ceb68c1487d79e
BLAKE2b-256 605e9e58b47c9c37aa09acc4a6431d979f342580e48bb85433b43277eca67002

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytaskwarrior-3.0.0rc3-py3-none-any.whl:

Publisher: release.yml on sznicolas/pytaskwarrior

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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