Todoist Python



Should every dev blog has some “open source project that I’m currently working on in my free time”?? Probably not but I will show you mine. Just in case it should… 😉

The official Todoist Python API library. While looking for todoist integrations, I found out that the app itself already offers Webhooks based on events you can tailor e.g event:created. Shouldn’t be that hard to build it on your own. How Python Flask-App running on your own machine. In that time I was working on a Python Flask backend to. Class pytodoist.todoist.TodoistObject (objectjson) ¶ A helper class which ‘converts’ a JSON object into a python object. Class pytodoist.todoist.User (userjson) ¶ A Todoist User that has the following attributes.

Why?

Tumblr wallpaper for mac. It’s console client for todoist task management app. Whole idea comes from one reason.

Todoist

Too many open tabs in browser ⇨ Let’s close todoist ⇨ don’t look at tasks ⇨ don’t do tasks 😒.

First think that came to my mind was a little widget on desktop but let’s be honest… I would close it too. So where I spend most of my time working? VS Code and console! The choice was simple. Almost as quick as checking git status I can type todoist and look at my tasks 🎉.

Take a look!

Let’s clear something up

The goal was not to implement all todoist API functions in console. The goal was to build the fastest access to basic functions like show tasks, add task, complete task. I’m not going to describe all work here now, instead I’ll try to show you what you can learn from such simple ‘app’ 😉.

Connection

Python

I have used todoist Sync API with python. It’s quite simple, all you need to have is your user token. Find it in your settings ⇨ integrations ⇨ token. Base on it create client object which will make all magic for you ✨.

And since then you have all your information up to date.

Config

I have prepared some config file. So far you can set your token and emojis there, but I hope it will grow a bit. You can set your token by passing it to JSON file, or I have prepared a command for you 🎀. It will load config, change it and save it again. The best media players for mac.

  • To set the token use todoist --set-token your_token.

Todoist Python Api

Make it work!

Todoist Python Download

Below are some basic commands. Remember that I’m still developing this project in my free time. Mac theme for firefox. You will probably see some differences. The most up-to-date version will be on GitHub so check out README file.

Todoist Python

  • To get tasks that are/were for today and those overdue use todoist list.
  • To add task with default date value as current day, you don’t have to use –date flag. In case you want to specify date use YYYY-MM-DD format. todoist --add 'name of your task' --date yyy-mm-dd.
  • To complete tasktodoist --complete id_of_task.