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.2a2.tar.gz (68.8 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.2a2-cp39-abi3-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.9+Windows x86-64

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

Uploaded CPython 3.9+Windows x86

taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-musllinux_1_2_x86_64.whl (4.6 MB view details)

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

taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-musllinux_1_2_i686.whl (4.6 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ i686

taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-musllinux_1_2_armv7l.whl (4.3 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARMv7l

taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-musllinux_1_2_aarch64.whl (4.5 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-manylinux_2_28_aarch64.whl (4.2 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ ARM64

taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB view details)

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

taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (4.3 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ s390x

taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (4.8 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ppc64le

taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (4.5 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ i686

taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (4.0 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARMv7l

taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-macosx_11_0_arm64.whl (3.9 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-macosx_10_12_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a2.tar.gz
Algorithm Hash digest
SHA256 00b17546b7bf46106f63d271789509f249d03a9c7aba037d08858036b285cab5
MD5 e7d7b7e7d3e154783fa2cc52f8ad7bc6
BLAKE2b-256 7d22d8aed4889bf46d6342e60b1da5e0cd6258f402912cb2de18b7ff0af5e97c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 320a489547094c06e230e156963f9aa838a4f653fbb7b04d95374e03151ce71d
MD5 75ab887814f891f71f02819c2f14a8bd
BLAKE2b-256 9b5538c826edd3cb0fc422e0305d583747e33d8dcde549cf2189a33be606fc6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 806415e75aeac4c90f1f6f4054fa8975d45f0714d7df82928dcedb67f9fa0d8c
MD5 b4ca0c9a15f034ca71f36107974d408f
BLAKE2b-256 9d9b865a0636512197d0c7e9b502f061d24e243339bdf37c0392e8bcc4cc623f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3be51d727e78f3a5a6d400b522c57be76596308f6766ff8219c882f38789b115
MD5 5990607f37d29d63e3136fd8e1a32275
BLAKE2b-256 1f2ad31653b3605272939df8391b6aa5a1d252a7e9334e0ed5ac2eee148c0a79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 b3b35464db497a517f96e815f07d43583e4121995492104c68b37c845bbc3274
MD5 dd89c8388b7f12c625f898362a288796
BLAKE2b-256 ab986b39abd33acc827c2baeaa0eb8b5509c7db15deb99935bb93d91bef81981

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 996f995252ca61d8fbf46caeffac55bd0858be844059bca1179cbbf220b9358f
MD5 d416c2f99f810624bc751a9599107534
BLAKE2b-256 16830ffbcd56e6f2b9d9a141f29e7f9973ca7ca6658b7e4cbc64166c62145b3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 7814ba85ff2ee2769665416139167837c52c1d68a534bc93c25ea308b27cdca7
MD5 5afbf4016c2d7a3654891473d0d39657
BLAKE2b-256 a0e7fc2f0a9651ab6e360c6712a876b18de24bdf9b98b2ee1a33fb0fb33e7c08

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 305861ac13f176ace4f9b0ce0205230f764b4e3219bdf2dfed3a03c27a1af9b0
MD5 ee78e8eb75e89ca8f270dc5bd794873d
BLAKE2b-256 84f5353c1658af6c245d1917ff9d68591c4ef154cb37affa9f328967542145fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2694eba3283bab760a6ce34ee6376ead2c2821741f6c165639b5869865132667
MD5 51ebf1c5bad7e54def30e0dd10595a80
BLAKE2b-256 b663cad3e40e79ab18bf098cc23c2d626e9a40ffc17819871203a7876138ab32

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 4fbae0b8a3ea12f834b09b891ebb41dfbbac89955e4d2d4828148f7555e86bfd
MD5 e9c7bcc4e4291e8e5915ef4052c55777
BLAKE2b-256 fc2850e7df9d63237fd6a41bae2f89c1756c03cf650afd8dbf2beed4104cdd0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 572d6e5b436133bb0811763b52b7e7747ec82110b4e1fdf02705e4a99b6c36ee
MD5 3c2d078d7157dab03625db310fbd426d
BLAKE2b-256 269c8e22b450bc1416f494140bc13b261c62f894c615878570c2e8fe7b00cbbc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 dc9fba1b8eb0c4177adff0557d3ea5be847b5faaef4d16da79134671101dbe30
MD5 f84efd08a2a09c57e8920d0793f1c94d
BLAKE2b-256 5b7c730d8e6885b71a186e321a4da585e08091c08392b949f94d758a1dc9a85c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 bf0d3bd66763f544811cf1ff16a078a780dbf055735a20f4cfe513dc155e94b9
MD5 eff95731bd7b8ea2547419af9394c5ec
BLAKE2b-256 87871a07761d59f1755cc76f3c863751c3d53c07b492a616b690c83a33fa0d09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9bdfeda4dc3a99837c7bc35fcfe9d23bd8a4b0c76e1d1f0edd515d20c2470dfa
MD5 fd9632a206b5c7f34d5690eafdf44aab
BLAKE2b-256 753dfe8a193352816b95f5065422463085b50d658bc00339103529b010d39589

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taskchampion3_py_dev-3.0.1.2a2-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4537cc948616e69ba77f16b9790a9177b3d073460e878f35d9f0b4cef95f4519
MD5 4271bee4bb02ca8a8c707b81d6c8050a
BLAKE2b-256 ea8b2f7d60dab74f1b66866e754d462311ed056324c8929dfc46bc3c295418aa

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