todoist.api

exception todoist.api.SyncError[source]

Bases: exceptions.Exception

class todoist.api.TodoistAPI(token='', api_endpoint='https://todoist.com', session=None, cache='~/.todoist-sync/')[source]

Bases: object

Implements the API that makes it possible to interact with a Todoist user account and its data.

classmethod deserialize(data)[source]
reset_state()[source]
serialize()[source]
get_api_url()[source]
generate_uuid()[source]

Generates a uuid.

sync(commands=None)[source]

Sends to the server the changes that were made locally, and also fetches the latest updated data from the server.

commit(raise_on_error=True)[source]

Commits all requests that are queued. Note that, without calling this method none of the changes that are made to the objects are actually synchronized to the server, unless one of the aforementioned Sync API calls are called directly.

query(queries, **kwargs)[source]

DEPRECATED: query endpoint is deprecated for a long time and this method will be removed in the next major version of todoist-python

add_item(content, **kwargs)[source]

Adds a new task.

todoist.api.state_default(obj)[source]
todoist.api.json_default(obj)[source]