This Python script utilizes the Canvas API and Todoist API to automatically transfer the tasks of a course1 hosted on Canvas into a new Todoist project.
This project requires Python (version 3.8 or later).
Follow the instructions below to get the application up and running locally.
First, clone this repository:
$ git clone https://github.com/jasminjohal/canvas-to-todoist.git
$ cd canvas-to-todoist
Before proceeding, I recommend setting up a virtual environment.
Install the dependencies:
$ pip install -r requirements.txt
Create a new file with the extension .env
in the same folder as the main.py
script and name it .env
.
Add the following two lines to the file. Make sure to replace both {your_canvas_key}
and {your_todoist_key}
with your API keys for Canvas and Todoist, respectively.
CANVAS_KEY={your_canvas_key}
TODOIST_KEY={your_todoist_key}
$ python main.py
Pay attention to the console because the application will ask you to input information twice. First, it will ask you to enter in the ID of a course. This course ID can be extracted from the course's Canvas URL. It is the number after /courses/
.
For example, for CS 361, the course ID is 1877222
.
Later, the application will ask you to provide a project name. This is what the new project will be named in Todoist. Feel free to name it whatever you would like.
Footnotes
-
Note that you need a Canvas API key to run this script and Canvas only authorizes you to get information for classes you are/were enrolled in. ↩