Todo
Checkbox tasks for tracking completion. Supports nesting, child blocks, and rich text.
Syntax¶
Unchecked:
Checked:
You can nest child blocks (paragraphs, todos, lists) by indenting them with four spaces:
Examples¶
Simple list:
With nested children:
Mixed with paragraphs and lists:
Builder¶
from notionary.markdown import MarkdownBuilder
markdown = (
MarkdownBuilder()
.todo("Write docs")
.checked_todo("Review PRs")
.todo("Prepare meeting", builder_func=lambda b: (
b.paragraph("Agenda:")
.todo("Slides")
.todo("Demo")
.checked_todo("Confirm room")
.paragraph("Notes for team")
))
.build()
)
Reference¶
Notion API Reference
For the official Notion API reference on todo blocks, see https://developers.notion.com/reference/block#to-do