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.2.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.2-cp39-abi3-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.9+Windows x86-64

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

Uploaded CPython 3.9+Windows x86

taskchampion3_py_dev-3.0.1.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2.tar.gz.

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2.tar.gz
Algorithm Hash digest
SHA256 d32e9eac06dbe95473ab92c212209b78d2d8677448cb64170ec12a122facbf19
MD5 37318cc055fb4bc09df8e7ff60dac72e
BLAKE2b-256 464cc67693b1263b07fa2791cee7a341992fb29513be7aacc6b6f1e05cf0fa60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6e76b3a6dbd7505d189fb71c49585d575abfbf9b96c77810aee1f2d4aa2280c1
MD5 30a038687319a2f1d84990303b026ea4
BLAKE2b-256 0d5480f27f9a2dd1eb61da3d4ff758dd8ed6ccbf78ae654b78d1df744b3b5f95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 6665442557b6dcc8cb0314aa99ff99cdb0119db53bce11448163a92f8a4beab0
MD5 4cf6d9f729746ec5ec5b6f14419940a7
BLAKE2b-256 c509b704957a930c235cb098bede1fc569c4202c4364ef52b0c6c2e3e39ae1ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 362daa49abcb06ba09e9e322d15ffe71e0b138a2edde1d752d51ce4e2407879e
MD5 c97ab07842978b7a40acf55693ef4674
BLAKE2b-256 f4c7321e57dd283df1c59e4345ce5dad7b0d8a667ddb3e8e908b6f05c82b03d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2-cp39-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 0f7bd444387d4bb49bdfbad963369766cf893edb25846e1c472d92f423c0b9e1
MD5 99211230038a4d86a504ab6a6c137eec
BLAKE2b-256 39520e176ba34950f270dc54c44a8fa30aa06f11fab19f7e0e026d8e933c9515

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2-cp39-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 9fc45e8a162ef723be96205015f1bbd7fcc13e5bb5fb10a14e52f12c30083867
MD5 0959c201f22a22bc711bdeecf76ee1f7
BLAKE2b-256 7f50095d8709caafb8fa20bacb8f23906626dfeac8f79de9340415accb0bfee5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 d13480466cc3ec1e82d0d5260fd3a2fe6b0e560fbfc80a27bfc76d9d3d762699
MD5 42f3882076626922f3f7d1feb166044b
BLAKE2b-256 85ddbf172871dc2b8b831aec9f58d638e5f9ddf2002cf39253dc6e1692469ffc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 85dc0d89f219d8d1018d521bdb1a8636ed87caaff721d28b7125aff471437d1e
MD5 c301a166582158e75d839e8855e0e9fb
BLAKE2b-256 734ea1c62b45c2761fb2c4fd3a3241c821a87e3c1fbfe6c381ff61b49bb6126c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 92e33d9a0c303f42e2c6ed2d071750082a8342fde6d6a5fed274bb6e4e5196ba
MD5 d8a53243410175fa3a45259fe61b4ebf
BLAKE2b-256 bd878a0e2085525a12bf3fe58751a0f19df183beef4abe44b0f7d8b00d943aaa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 a514c43ccfecceca3456f58efd0fe774c08967230555a080a35737fee568fa0d
MD5 0511145a1447fb26b18483613a4a8d8c
BLAKE2b-256 b1f9777ec71335c982e93a8b20a682bd41becfc540ca37714be0e3d497684f07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 522260f552a211f39da752b0f3adb10f00e6984baaaec70cba03c496b948fdea
MD5 a9fdb2c746f8eb7b93f1bfb869ccc9da
BLAKE2b-256 9ae2933289b250e5ecc26c0140528c030d57e4bdd3c2b1457703f56d846f75fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 78eb7ef256f9e8707ba70b2c36d059647549013b5c1563524588ae561d85d3e4
MD5 19209879691695c794119684904e811a
BLAKE2b-256 0ee17c6adb489f82495a6416e33e327ec17c9b70318230b380e80c5bf97ef50a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 8fc9d6a1b03aa8dcb9675cc9a5f0d71ff2489ed45d445bbe8eb55a94442cf2a8
MD5 51ecc5ae403ff2d936c3414aa55e22f6
BLAKE2b-256 1a075014113c4e0f24de1cb0e8932936b998a505a52676f2acb95d8d86bb370f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 790a72dd554d8be91226a902d0066a2fd2b8fab667f013ac931f61d9c901ab19
MD5 34bc6fcfa682b6cb6cf4815329483885
BLAKE2b-256 5926a16cf103a702795bbfefaa432c94d1453fe38bf75c55f02e8e6733b15a98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0f82f6861b98650af9d59594a8557f9e37e260b1c0691991d0cf44120ee7c3ed
MD5 06428d69740bf250f38d8b44fd957f6d
BLAKE2b-256 abc204df70eca87bdbab89e379a56371522d9a144399dda90915a83d767b2e46

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