Skip to main content

Todoist API Python Client

This is the official Python SDK for the Todoist API.

Installation

pip install todoist-api-python

Or add the project as a dependency in pyproject.toml:

dependencies = [
  "todoist-api-python>=3.0.1,<4",
]

Supported Python Versions

While we only actively test under Python 3.13, we strive to support all versions from Python 3.9 and above.

Usage

Here's an example of initializing the API client, fetching a task, and paginating through its comments:

from todoist_api_python.api import TodoistAPI

api = TodoistAPI("YOUR_API_TOKEN")

task = api.get_task("6X4Vw2Hfmg73Q2XR")
print(f"Task: {task.content}")

comments_iter = api.get_comments(task_id=task.id)
for comments in comments_iter:
    for comment in comments:
        print(f"Comment: {comment.content}")

Documentation

For more detailed reference documentation, have a look at the SDK documentation and the API documentation.

Development

To install Python dependencies:

$ uv sync

To install pre-commit:

$ uv run pre-commit install

You can try your changes via REPL by running:

$ uv run python

You can then import the library as described in Usage without having to create a file. If you decide to use TodoistAPIAsync, please keep in mind that you have to import asyncio and run asyncio.run(yourmethod()) to make your async methods run as expected.

Releases

This API client is public, and available in a PyPI repository.

A new update is automatically released by GitHub Actions, by creating a release with a tag in the format vX.Y.Z (v<Major>.<Minor>.<Patch>).

Users of the API client can then update to the new version in their pyproject.toml file.

Feedback

Any feedback, bugs, questions, comments, etc., can be reported as Issues in this repository.

Contributions

We would love contributions! Pull requests are welcome.

Metadata

Release files for todoist_api_python 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for todoist_api_python 3.0.1
File Size Uploaded Provenance Actions
todoist_api_python-3.0.1.tar.gz 19.5 kB Without provenance Details for todoist_api_python-3.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for todoist_api_python 3.0.1
File Interpreter ABI Platform Actions
todoist_api_python-3.0.1-py3-none-any.whl Python 3 none any Details for todoist_api_python-3.0.1-py3-none-any.whl

Total release size: 41.8 kB

Release files / todoist_api_python-3.0.1.tar.gz

Download URL todoist_api_python-3.0.1.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b954877c35a39067188f60ad00e0db7011afa4bf1a47e9efdcd63cb5a6a39dce
BLAKE2b-256 checksum
How to use checksums
c7ce69b97da18a63e22d8a61d0a3b6d0a56ec6c4cc27b390d431a0be9ae8ef54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.11

Release files / todoist_api_python-3.0.1-py3-none-any.whl

Download URL todoist_api_python-3.0.1-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7284fd23983883e855793514145caf736ade8980d563f71508c10285c9179b55
BLAKE2b-256 checksum
How to use checksums
e8ad591bbe8e7883b09152f0c53639e6f34a19b8cc6fab2b0f7cf0b0c25acf66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.11

Security for todoist_api_python 3.0.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page