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.2 corresponding to TaskChampion crate 3.0.1. The fork remains on the 3.0.1.x line as long as upstream taskchampion stays on 3.0.1; the 3.0.2.x line will track upstream taskchampion 3.0.2 when it ships. The fourth version component is the package-only revision (build/packaging fixes that do not change the wrapped Rust crate).

Installation

Install from PyPI:

pip install 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.3.tar.gz (76.7 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.3-cp39-abi3-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.9+Windows x86-64

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

Uploaded CPython 3.9+Windows x86

taskchampion3_py_dev-3.0.1.3-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.3-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.3-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.3-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.3-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.3-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.3-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.3-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.3-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.3-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.3-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.3-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.3.tar.gz.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.3.tar.gz
Algorithm Hash digest
SHA256 ff5fa553b90aa9cff26446101f0a049f938e7706ddf2178f930eb417f23b5d50
MD5 a18377b31d3ed4f5e7d5913800d084f0
BLAKE2b-256 5d836851b4c9ac698b4c5a79aa56fb21216f3f664b5aca660d4270bf7e4b63fc

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.3-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.3-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 80620c3dae8edf24f89b164beecda16ae23ebf127ef2ab2ae73e76db052115dd
MD5 4d0ef64292d43342bd72d30984d5f500
BLAKE2b-256 2c2672482b8ea88cc3622ac14e0dd8976815e9f6c289c7f688ab9fb2ccce18ba

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.3-cp39-abi3-win32.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.3-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 fc1e3ac33c9ad4ed9a245134d5ba105efa932de3ff35ab1267416c6ca9c38811
MD5 b5435c42326b33888a3bc1d110290a46
BLAKE2b-256 9b0745645324fd292e3c8b36aebe21250cc6e0419f2d699339d5fe85fee135ce

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.3-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.3-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 55a95843bff1e16b25d079b4d5086e79c3f1b90198e4df50ca5b560c3651725f
MD5 8446432d4de4bb85b614d66d27931ecf
BLAKE2b-256 f307c243ee3868d45ba84a307fc8b948860786b1774c52fcea0b0911e87756c2

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.3-cp39-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.3-cp39-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 4afced659bdd7bd258e6cb1ca17fd27db008ded5a1e43db14228959c82f04863
MD5 b90042506e3ad8c59bb055ee7dbcadd7
BLAKE2b-256 50aaeb10a51252bcacfae186b0dfc1ce145c00b30a701af9a49239a8ce7c5636

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.3-cp39-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.3-cp39-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 30dae150370319405dc2b4f7ba15dc482af7d64407f8f82de0b0c66e93be5a3e
MD5 5778dae746ac538f2cabac335bfe4084
BLAKE2b-256 70688dfaf0392afb10cf472f38e0ac051db63008662ef6e77c1479c32c4dd60d

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.3-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.3-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 574ad68ca7a21e9ea8fdea04afdbe8860afba6d5da65d4874ae0135b96dca8a9
MD5 b8515130f6ede17a6cde2b9bacd3ee2b
BLAKE2b-256 e0575481cb7af1bb224bf536d66047d556703be67a4447bca2be0a35bd775159

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.3-cp39-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.3-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2bb0897e254e4f8de93908d33782d091e95f41d70e621d465ddce8b72cdefbd9
MD5 84c9c67bab9b56ed5bae904d61006e81
BLAKE2b-256 f269836684d62270f5caaae3f3ff28c4b93294752e2b9160872432e38cc924cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 47b3d2d7d4915a6a78e80c9d9a88e0d0a6144c59f587780cb9cb9edafec5897b
MD5 00877855aa3426be65c3beb4f3bdfb95
BLAKE2b-256 a4d75f559a1d569e01b81d979d59a93fe6291c22b1a4d512c7a150fcbfbf4b55

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.3-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 9208972bbd3d23fb1412841419afac74e458cb4adfdfd5e2573faff4617362b7
MD5 f1fbe11b7e0de73e9ef88c6f0256e9b2
BLAKE2b-256 744891647a8f91e9b2e19fa46bd973f668b5002061714f95f6a8416b04e732e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.3-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 7e6a2de582f8a7ddc0a4eb28fc84abc6904233816330fb15a112405ea54b1a16
MD5 1fb161e5a6eb4278a582d127103557d9
BLAKE2b-256 3f838f7e3ce0ebeee099e8c9d758f5fd7cbe4d4a91587d19d50d471919bfc752

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.3-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 057324e1c15bf0bab8e432491c79ffd52aa8a9b771ca9f73ffb8dc0b7da69750
MD5 640dd3ca30c27b32bfaa2c333a1ab036
BLAKE2b-256 c32b2a2ef9ec46c9701aba3a94432540e49534e2f49dcbdb654ab189b089ea0e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.3-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 702ba47ad2f61635ab121582f3ed57b543b8132b3494cfc0db4abc884a980ddb
MD5 c9b43087c5457f3c8fdd6b907ff20dbb
BLAKE2b-256 b6f3560ff38dba708e4fcdd70232f5ef3e5dc033a5ee4b3a9905821916d873ec

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.3-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.3-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ab4f301baa88058cb2df7132bc1ae89d414c638183fd6b3d5a505d31c9028d71
MD5 657cbe509b33012049115e412c5d8d82
BLAKE2b-256 131ea99a0bbd94ca6888d75d0e301bd1913b8461b13997f44af64941d7ccd29a

See more details on using hashes here.

File details

Details for the file taskchampion3_py_dev-3.0.1.3-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.3-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f30572f967b6987e27f9e787b731c0f2a0505e94fd808ea0da2e237e0f59abc1
MD5 70bdbd56a6928e348fbf691f149138be
BLAKE2b-256 3f7315b611d91446ca18e398ed79eb67999efec8dee9e3395092dc92e5f9743c

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