taskchampion
This module wraps TaskChampion in a Python API.
Most types and functions match those of the TaskChampion Rust API, with exceptions noted in the documentation here. See the TaskChampion documentation for details.
For the Rust Option
type, the None
variant is represented by Python's None
, while
the Some
variant is represented by the contained value. For example, Task.get_value
returns either None
or a string containing the value.
Timestamps are represented as Python datetime.datetime
values. UUIDs are represented
as strings.
A replica represents an instance of a user's task data, providing an easy interface for querying and modifying that data.
A replica can only be used in the thread in which it was created. Use from any other thread will panic.
Create a Replica with on-disk storage.
This is equivalent to created a StorgeConfig::OnDisk
with the given parameters and
passing that to Replica::new
.
Raises RuntimeError
if the database does not exist, and create_if_missing
is false
Sync with a server crated from ServerConfig::Local
.
Sync with a server created from ServerConfig::Remote
.
A TaskChampion Task.
This type is not Send, so it cannot be used from any thread but the one where it was created.
A TaskChampion Operation.
This is an enum in Rust, represented here with four static constructors for the variants,
four is_..
methods for determining the type, and getters for each variant field. The
getters raise AttributeError
for variants that do not have the given property.
A sequence of Operations.
This is a list-like type, and can be indexed, iterated over, and so on like any other list-like type.
An annotation for the task
A TaskChampion Tag.
The constructor for this type parses its argument using the FromStr
trait, and supports both synthetic and user tags.