Official Python SDK for the Todoist REST API.
Project description
Todoist API Python Client
This is the official Python API client for the Todoist REST API.
Installation
The repository can be included as a Poetry dependency in pyproject.toml
, it is best to integrate to a release tag to ensure a stable dependency:
[tool.poetry.dependencies]
todoist-api-python = "^v1.1.0"
Supported Python Versions
Python 3.8 is fully supported and tested, and while it may work with other Python 3 versions, we do not test for them.
Usage
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)
Documentation
For more detailed reference documentation, have a look at the API documentation with Python examples.
Development
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 describe in Usage without having to create a file. Keep in mind that you have to import asyncio
and run asyncio.run(yourmethod())
to make your async methods run as expected if you decide to use TodoistAPIAsync
.
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, such as bugs, questions, comments, etc. can be reported as Issues in this repository, and will be handled by Doist.
Contributions
We would love contributions in the form of Pull requests in this repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file todoist_api_python-1.1.1.tar.gz
.
File metadata
- Download URL: todoist_api_python-1.1.1.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5080f1b21b17378454ae0b8ceb8c647803fba023526176c8a9bb784508fb8508 |
|
MD5 | 53e2dbb7069abbc855bc76284212c996 |
|
BLAKE2b-256 | 5bd9d75bee7ece01c35f310b8d354d3ac0bd507b6720952c79aa0cd99d5a4b71 |
File details
Details for the file todoist_api_python-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: todoist_api_python-1.1.1-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17e70ecf77ae879248f61bc8b8ce9fa2765a57901b78a75d92349143e614f3b5 |
|
MD5 | 42b6e7f74eae7cb2850d4d242fc9d73d |
|
BLAKE2b-256 | a4e99e8d7dbf5312175bbd54eaed5402f5619298ad73760fb2404228b1edf71e |