todoist_tree
These are the core functions of todoist_bot.
The reading and writing functions are just (sometimes typeguarded) aliases of Todoist api calls. The differentiating functionality is building a tree with
import time
from todoist_tree import headers
from todoist_tree import read_changes
from todoist_tree import tree
headers = new_headers(api_token)
todoist = None
sync_token: str = "*"
complete = False
while not complete:
todoist = read_changes.read_changes(headers)
if todoist is None:
# no changes or failure
time.sleep(2)
continue
sync_token = todoist.sync_token
projects = todoist.projects
sections = todoist.sections
tasks = todoist.tasks
id2node = tree.map_id_to_branch(
todoist.projects,
todoist.sections,
todoist.tasks
)
# do something here
time.sleep(5)
The tree doesn't have one root. map_id_to_branch maps the id[1] of each project, section, and task to a node. Top-level projects will not have parents, so they are effectively roots of their own trees.
See todoist_bot for a full example.
[1] where id is the value returned in the json dictionary from the Todoist api, not the Python object id.
Metadata
Release files for todoist-tree 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| todoist_tree-0.5.2.tar.gz | 8.7 kB | Without provenance | Details for todoist_tree-0.5.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| todoist_tree-0.5.2-py3-none-any.whl | Python 3 | none | any | Details for todoist_tree-0.5.2-py3-none-any.whl |
Total release size: 19.5 kB
Release files / todoist_tree-0.5.2.tar.gz
| Download URL | todoist_tree-0.5.2.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
602352ed19b860da8df5b2d0d8dc3e1309aa5ae3f7dd9522062216663aae618f
|
|
BLAKE2b-256 checksum How to use checksums |
c72fd319a30a1980a1b1508ab8a27ad3c534d9f0f64b51e57b248f0652183ae2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / todoist_tree-0.5.2-py3-none-any.whl
| Download URL | todoist_tree-0.5.2-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d42549beb560ec50b4005e9dfad36388322e66e3f6da4058cde410c0b15f81c
|
|
BLAKE2b-256 checksum How to use checksums |
109507b634ca162f29c159f27af1895898bfad4fe0d42cf05430578070e7dcde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for todoist-tree 0.5.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.