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.0.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.0-py3-none-any.whl (58.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytaskwarrior-3.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 d8059463f5dc937f8a12bad5109828e83f83b2d2246718420fb8ab9fb8f1eb05
MD5 61399929be30aedcaa4aa6ce25054150
BLAKE2b-256 3aa9af9b9688e075b9fe3e012a8e6c7c10c15a0d9b5cb80cf5a38eef4ed2a694

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytaskwarrior-3.0.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: pytaskwarrior-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 58.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pytaskwarrior-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4636670718aa6d4d562e13c29b9ec9d249ac103b76dfad5090c00906a7b73c6d
MD5 abcba4d7bd6098395e39739a0aa67379
BLAKE2b-256 0594c7a7e0dd030fcc9db2b391dfe9df97edd356be629fc14d9420a82f891ead

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytaskwarrior-3.0.0-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