Skip to main content

Official Python SDK for the Todoist API.

Project description

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.1.0,<4",
]

Supported Python Versions

Python version 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.

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

todoist_api_python-3.2.1.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

todoist_api_python-3.2.1-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file todoist_api_python-3.2.1.tar.gz.

File metadata

  • Download URL: todoist_api_python-3.2.1.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.11

File hashes

Hashes for todoist_api_python-3.2.1.tar.gz
Algorithm Hash digest
SHA256 22c60230cc616437846f9a6469dddd97548545ef916d2bea98b2ca2f522d92f9
MD5 f23cc58db41b3f98d4303094c9e30615
BLAKE2b-256 bf6e1ff0e0e098f2196f6eda3f20ebe0653a978abee5345f5ed1dfd1a9b5bbdc

See more details on using hashes here.

File details

Details for the file todoist_api_python-3.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for todoist_api_python-3.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1091e9b557291380abd79245efe961b0f2261c7b4eb16e52beccfc6357320e95
MD5 6e8140a44e58b864e57636b2e92bd1f6
BLAKE2b-256 2d7c6baa538db710f8d9cc4ed15f1f757ab9bc8564941d9c3291b9d7fcee7746

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