Skip to main content

Taskwarrior wrapper python module

Project description

pytaskwarrior

Python 3.12+ License: MIT Code style: ruff Tests Coverage PyPI version

A modern Python wrapper for TaskWarrior, the command-line task management tool.

Production-ready with 164 tests (96% coverage), strict type checking, and professional-grade code quality. Zero linting errors, full async-safe subprocess handling, PEP 561 type hints for IDE support, and a consistent exception hierarchy.

Features

  • Full CRUD operations for tasks
  • Type-safe with Pydantic models
  • Context management
  • UDA (User Defined Attributes) support
  • Tag discovery and @ context tags
  • Recurring tasks and annotations
  • Consistent exception hierarchy (TaskNotFound, TaskValidationError, TaskOperationError, TaskConfigurationError, …)

Requirements

  • Python 3.12+
  • TaskWarrior 3.4+ installed

Installation

pip install pytaskwarrior

Quick Start

from taskwarrior import TaskWarrior, TaskInputDTO, Priority

tw = TaskWarrior()

# Create a task
task = TaskInputDTO(
    description="Important meeting",
    priority=Priority.HIGH,
    project="work",
    due="friday"
)
added = tw.add_task(task)

# Get all pending tasks
for t in tw.get_tasks():
    print(f"[{t.priority or '-'}] {t.description}")

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

Tags

tags = tw.get_tags()  # virtual tags excluded
all_tags = tw.get_tags(include_virtual_tags=True)
context_tags = tw.get_context_tags()  # tags starting with "@"

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.0rc1.tar.gz (49.3 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.0rc1-py3-none-any.whl (58.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytaskwarrior-3.0.0rc1.tar.gz
  • Upload date:
  • Size: 49.3 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.0rc1.tar.gz
Algorithm Hash digest
SHA256 69e0e6b20913a1edb20cf4b7ff005862462f598e8bb2f93ec0b1ebe4809a6f2a
MD5 a7bec7c647c353d175a2735c0f97032d
BLAKE2b-256 5e3f8798494f1ce6ad6437d03ac4370e9545a8746dfa7e57c8334c5805897add

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pytaskwarrior-3.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 13d3e3e15468867759c2a3f7dd041da36ac9649a95b44fdd5ac05eb721edcd7d
MD5 e49340fb3568dab2cf070f56d9dcf43c
BLAKE2b-256 caad0059598de939a677eb8a16d68f11f788ab08c4a67992cd79c5e799e1b4ab

See more details on using hashes here.

Provenance

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