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.0a5.tar.gz (49.2 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.0a5-py3-none-any.whl (57.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytaskwarrior-3.0.0a5.tar.gz
  • Upload date:
  • Size: 49.2 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.0a5.tar.gz
Algorithm Hash digest
SHA256 178d9f0de224cc1a9589908c14124ddce73b5608108f29354d1af3358d8a950a
MD5 3a411ab8c47808df5288154b6bab3194
BLAKE2b-256 35bfa1ed3dc8c091faa169fad395abf6223f851831d22773a019b5b7bd7722bc

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pytaskwarrior-3.0.0a5-py3-none-any.whl
  • Upload date:
  • Size: 57.9 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.0a5-py3-none-any.whl
Algorithm Hash digest
SHA256 519c5d7ed3cc5d4e32a2cb12510e4b8fccbb3d14ecf1f0577cfa448fcdecaaeb
MD5 f680c6b5365b99647cfc289610d3b94e
BLAKE2b-256 9a66e65a805abaa99b59f9594c962d9822a19dbf0e7410bb7881b18c13e8c407

See more details on using hashes here.

Provenance

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