Skip to main content

Python bindings for TaskChampion 3.x (fork, updated for taskchampion=3.0.1)

Project description

Python Taskchampion Bindings

This package contains Python bindings for TaskChampion. It follows the TaskChampion API closely, with minimal adaptation for Python.

Versioning

The taskchampion-py package version generally follows the Rust crate version. This fork publishes as taskchampion3-py-dev with Python package version 3.0.1.2a1 corresponding to TaskChampion crate 3.0.1. When an additional package-only release is required for the same Rust crate, a fourth version component is used (e.g., 1.2.0.1).

Installation

Install from PyPI. The --pre flag is required while this fork is published as a pre-release (aN / devN):

pip install --pre taskchampion3-py-dev

The PyPI distribution name is taskchampion3-py-dev, but the importable Python module is taskchampion:

import taskchampion

Pre-built wheels are published for CPython and PyPy on Python 3.9–3.13, covering Linux (glibc and musl: x86_64, aarch64, armv7, i686, s390x, ppc64le), macOS (Intel and Apple Silicon), and Windows (x86, x64). If no wheel matches your platform, pip will fall back to the sdist, which requires a Rust toolchain ≥ 1.91.1.

Usage

def main():
    r = Replica.new_on_disk("/home/username/.task/", False) 
    tasks = r.all_tasks()
    print(tasks)
    for uuid in tasks.keys():
        task = r.get_task(uuid)
        print(f"Description: {task.get_description()}")
        print(f"UUID: {task.get_uuid()}")
        print(f"Status: {task.get_status()}")


if __name__ == "__main__":
    main()

For the Replica.new_on_disk(path), the argument is directory to your sqlite database (to match the Rust implementation). For a thorough understanding of the Rust implementation, which this Python package emulates, see the Rust documentation at: https://docs.rs/taskchampion/3.0.1/taskchampion/

The output of r.all_tasks() is a dictionary. The keys are the UUIDs of the tasks. Here is an example based on a couple test tasks:

{'8655d0fe-3627-43b2-933a-7703609b101e': Task { data: TaskData { uuid: 8655d0fe-3627-43b2-933a-7703609b101e, taskmap: {"modified": "1775169728", "description": "test task 2", "entry": "1775169728", "due": "1775188800", "status": "pending"} }, depmap: DependencyMap { edges: [] }, updated_modified: false },
'f5bc3f9d-d97d-4165-863d-2e08d6b53dc9': Task { data: TaskData { uuid: f5bc3f9d-d97d-4165-863d-2e08d6b53dc9, taskmap: {"status": "pending", "entry": "1775007191", "description": "test1", "modified": "1775007191", "due": "1775016000"} }, depmap: DependencyMap { edges: [] }, updated_modified: false }}

Using the keys method on the dictionary allows for accessing the tasks by UUID. Below is the output from the Task API commands:

Description: test task 2
UUID: 8655d0fe-3627-43b2-933a-7703609b101e
Status: Status.Pending
Description: test1
UUID: f5bc3f9d-d97d-4165-863d-2e08d6b53dc9
Status: Status.Pending

Referring back to the dictionary, notice the strange numbers under entry, modified, and due. When the Task API is used to fetch the data, it is converted into a user-friendly date/time. For example, on test 1 the task.get_entry() results in: 2026-04-01 01:33:11+00:00

See the API documentation for more information.

Development

This project is built using maturin.

To install:

pipx install maturin

To build wheels:

maturin build

This stores wheels in the target/wheels folder by default.

Testing

Extra testing dependencies can be installed with pip. To run tests locally:

python3.12 -m venv .venv && source .venv/bin/activate
python -m pip install --upgrade pip
pip install maturin pytest mypy
# Build and install extension in editable mode
maturin develop --release
# Run tests
pytest

To reproduce the CI environment (ubuntu-latest) use the Docker recipe in the CONTRIBUTING or CI docs.

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

taskchampion3_py_dev-3.0.1.2a7.tar.gz (76.5 kB view details)

Uploaded Source

Built Distributions

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

taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.9+Windows x86-64

taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-win32.whl (3.2 MB view details)

Uploaded CPython 3.9+Windows x86

taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-musllinux_1_2_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ x86-64

taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-musllinux_1_2_i686.whl (4.7 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ i686

taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-musllinux_1_2_armv7l.whl (4.4 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARMv7l

taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-musllinux_1_2_aarch64.whl (4.7 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_28_aarch64.whl (4.3 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ ARM64

taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (4.4 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ s390x

taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (5.0 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ppc64le

taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (4.7 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ i686

taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (4.1 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARMv7l

taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-macosx_11_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-macosx_10_12_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file taskchampion3_py_dev-3.0.1.2a7.tar.gz.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a7.tar.gz
Algorithm Hash digest
SHA256 b0bd6c283dd2cc127976e425f105ca260e1a893542b90a7ed5f437829a82b46c
MD5 f6bf89dd67bb75dd593011bec7e8b7a5
BLAKE2b-256 2435af4025a899cce505bbc38ed87f833a875a671df6e5cad5649c65b30cb251

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 42ff47738d3a8447404b018a98d40f48503ddccaf57e09ccb18f3ede09117db7
MD5 831b637239d1050481d1fd4cf0af97aa
BLAKE2b-256 9d3ea904803d6442dcfc7e5b5a4b846f4f82480a1745fbc1094005db7b6f5a52

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-win32.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 f59a501249c1a754d5502dc37511af0998978c535b938f4d159f53ee41ee0a3f
MD5 b3d1c97ad24c8926f464e977f6f7e44e
BLAKE2b-256 81e47a571673902f44b2f8e28b6ecf612397dfd0a8d210e36d562c269fb7f075

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b0ad46c8bcf37bf012b99dd4661ec7d120dc4d3612c8422f7801e0d29a9dad67
MD5 665578b918d98c7425d1752702de7baa
BLAKE2b-256 33fe69a10566188163efea17874ba595ceb2ee60fe9008ae6a33f1ba2761bd80

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 055ae5e509896330fd5e075324105f5b24a46666412d31a4a81c730c7a3f0711
MD5 4f7892d72af6bfe4a85697c7447e3171
BLAKE2b-256 71084bc08f830f5b5fcd103b37558a2b408ff6256d9457bbb53077d0161e3773

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 0378b08e90d0d42a30a8e6fe906fd7f1bbafc94133f0078c434c2f02dd84f5e4
MD5 979be008c83adcb195fc8fe94b936a30
BLAKE2b-256 3355d35f984ae1b4721774f9a02e239c7e196fa072bd9b58434cc865674cac17

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 0e331e7b01c11b725fc31c4e0993c1d0dcc9df9eaa9f3c5df92a56c97af276aa
MD5 c3cd8c57317f78d4e5ffcb3f35a4e2d3
BLAKE2b-256 81d14eec31cfabaf5d133cfbeb0b813113358ac29abdf35c61f6f1006fa93dd5

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b40a6c6dc4cb2e2a531762c57e1dd309caca76b25c5ef61941d40e03de540678
MD5 912cef12bed6fe390937977ee5d90845
BLAKE2b-256 1d64ce9b231bc0313bf6d15a2a6d893fb59567b32674495595aed20c645bc438

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b23cecec1ef0b2ca227dae4ca72730aba8880f8f124afbbe0ffb0f6524c7a621
MD5 a81091947894872baa847185a523b58c
BLAKE2b-256 b163d75f31db635e11ea53c86a0d864923ae0af552ddd0369fe7f5c92cda776d

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 7688d10caf90d6c0414cdb5cb3b21f7dc1a4475849b995aef33771f172c1e642
MD5 955328a357b1f826a8943225851227ca
BLAKE2b-256 1147fb8f3a8c43dd4c067732c2075f6aecf44a3c2279a8308c23301dfd87c0bb

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 e6659e5a002edb59c70c78c34f3596c75e2ec3d74cdc19c15949510381d3329e
MD5 93ae348e031803d695698a2046d0df96
BLAKE2b-256 1e9ddb3df13935e8d649b4867ccbd1f3e8c0482543b44f6edd77fed2ceb38c61

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 c515b53cdffae84b90f493785ed1304ec9286bd1c94a19229b45a23f8f427688
MD5 13b787c526fa8d6ed12794b086ca4d55
BLAKE2b-256 0c3d06136b542d5196f8670c7797347e535bf4258c56215d5ab77027278f8737

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 6ff0fc5c7c7526493e0ff099cf95fa1f52b1c7432ac0d5065189bcfe3add609e
MD5 73d77c3f0d72126af3199f9d3bc7c72b
BLAKE2b-256 6292aa4f44bc2ffe4036a3d6d321e3cdb08d81d51abba179d63d66164ae63cba

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d3a959b7e1dd1af830bcf421cbfce1a2b811046d5d46895415114e47fc11db45
MD5 3fa36ab9ede4a56ee2c290d27ad5fbd3
BLAKE2b-256 7150d9dc0aca3a20b605d500197795875e72716e94c08fa20d7ff283c4240701

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a7-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f549d4c798c607a9e70b2ba1f0bcaffae1dd5c7ed12fbf2d1084171ba016aa5f
MD5 259f133119543d6c942b7c9d9e4918c5
BLAKE2b-256 01af43d94dd34c6fb3c3a3e3ac088de4fcd4dfeb3ab81466202826ed257b6d0b

See more details on using hashes here.

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