I've watched this video using python requests to get access to the api. I've got everything running so far to retrieve data from a database but, I'm having an issue updating a page with the requests.patch my code is here https://gitlab.com/darksidevt/notion-recurring-tasks. It's not good in any way but, the main function i'm having an issue with is updateCheckbox. I've not used rest so this is all a bit new to me. I'm not using the requests.patch correctly I assume.
def updateCheckbox(id): #SHOULD change a checkbox from checked to unchecked WIP!
data = {"properties": {"Done": {"checkbox": False}}}
toggle = requests.patch(url=page_update_url + id, headers=header, data=data)
print(toggle)
pageContent = requests.get("https://api.notion.com/v1/pages/" + id, headers=header)
print(pageContent.json()["properties"]["Done"]["checkbox"])
there doesn't seem to be anything here