michaelconan / notion-habits

Simple Python application to create daily and weekly habit tracker records in Notion databases, executed via GitHub Actions
0 stars 0 forks source link
notion python

notion-habits

Simple Python application to create daily and weekly habit tracker records in Notion databases, executed via GitHub Actions

Background

I use Notion as a habit tracker, among other things. Habits are tracked daily and weekly - a new row (page) needs to be added to the databases each day / week to record the habits.

Notion does not appear to have functionality to add these pages automatically, so I have used a few techniques to handle this:

Usage

The application has been developed to create daily and weekly Notion habit records, which can be executed as follows:

# Add daily habit record
pipenv run python ./run.py --type daily

# Add weekly habit record
pipenv run python ./run.py --type weekly

Dependencies

Packages are managed using Pipenv, which additionally loads variables from an environment file for development purposes.

I considered using notion-py but do not like the use of the browser cookie token rather than creating a Notion integration and using the internal secret / API key.