Official Python SDK for the Todoist REST API.
Todoist API Python Client
This is the official Python API client for the Todoist REST API.
The repository can be included as a Poetry dependency in
It is best to integrate to a release tag to ensure a stable dependency:
[tool.poetry.dependencies] todoist-api-python = "^v2.0.0"
Supported Python Versions
Python 3.9 is fully supported and tested, and while it may work with other Python 3 versions, we do not test for them.
An example of initializing the API client and fetching a user's tasks:
from todoist_api_python.api_async import TodoistAPIAsync from todoist_api_python.api import TodoistAPI # Fetch tasks asynchronously async def get_tasks_async(): api = TodoistAPIAsync("YOURTOKEN") try: tasks = await api.get_tasks() print(tasks) except Exception as error: print(error) # Fetch tasks synchronously def get_tasks_sync(): api = TodoistAPI("my token") try: tasks = api.get_tasks() print(tasks) except Exception as error: print(error)
For more detailed reference documentation, have a look at the API documentation with Python examples.
To install Python dependencies:
$ poetry install
To install pre-commit:
$ poetry run pre-commit install
You can try your changes via REPL by running:
$ poetry 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
asyncio.run(yourmethod()) to make your async methods run as expected.
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
Users of the API client can then update to the new version in their
Any feedback, such as bugs, questions, comments, etc. can be reported as Issues in this repository, and will be handled by Doist.
We would love contributions in the form of Pull requests in this repository.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for todoist_api_python-2.1.3-py3-none-any.whl