Skip to main content

NotionIt

PyPI PyPI - Downloads

Markdown to Notion uploader powered by Mistune. It supports rich Markdown, math, tables, files, images, and duplicate-title handling.

TLDR

pip install notionit
notionit

notionit shows the setup steps and checks whether the required Notion settings are visible.

$env:NOTION_TOKEN="YOUR_NOTION_INTEGRATION_SECRET"
$env:NOTION_PARENT_PAGE_ID="YOUR_PAGE_ID"
notionit status
notionit upload path/to/file.md

You can also pass the required values directly.

notionit upload path/to/file.md --token YOUR_NOTION_TOKEN --parent-page-id YOUR_PAGE_ID

What You Need

NotionIt needs a Notion integration secret and a parent page ID.

Setting Required Default
NOTION_TOKEN yes
NOTION_PARENT_PAGE_ID yes
NOTION_BASE_URL no https://api.notion.com/v1
NOTION_API_VERSION no 2026-03-11
NOTION_PARSER_PLUGINS no built-in Markdown plugin list

notionit status checks local environment variables only. It does not verify the token with Notion.

CLI

notionit setup
notionit status
notionit upload notes.md
notionit upload notes.md --page-title "My Notes"
notionit upload notes.md --duplicate-strategy timestamp
notionit upload notes.md --debug

Useful aliases are also supported: --parent for --parent-page-id, --title for --page-title, and --duplicate for --duplicate-strategy.

Run notionit upload --help for all options.

Python API

from notionit import quick_upload

quick_upload(
    file_path="example.md",
    token="secret_abc123",
    parent_page_id="notion_page_id",
)

Markdown Support

NotionIt supports common Mistune-powered Markdown features, including code blocks, tables, task lists, strikethrough, footnotes, inline and block math, file/image attachments, and invalid anchor-link skipping.

Default parser plugins are strikethrough, mark, insert, subscript, superscript, footnotes, table, task_lists, def_list, abbr, ruby, and notionit.math_plugin.notion_math.

Customize parser plugins with --plugins or NOTION_PARSER_PLUGINS.

Development

uv run --group dev pytest
uv run --group dev pyright
uv run --group dev ruff check .

Live Notion API tests are skipped by default because they create a temporary page in your workspace and then move it to trash with in_trash.

$env:NOTIONIT_LIVE_TEST="1"
$env:NOTION_TOKEN="YOUR_NOTION_INTEGRATION_SECRET"
$env:NOTION_PARENT_PAGE_ID="YOUR_PAGE_ID"
uv run --group dev pytest -m live

License

MIT

Metadata

Release files for notionit 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for notionit 0.2.0
File Size Uploaded
notionit-0.2.0.tar.gz 26.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for notionit 0.2.0
File Interpreter ABI Platform
notionit-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 52.0 kB

Release files / notionit-0.2.0.tar.gz

Download URL notionit-0.2.0.tar.gz
Size 26.3 kB
Tags Source
SHA-256 checksum
How to use checksums
da6e532a4dbd2ffb8ada5a8a5f1f51d54c229611a4447b9d93c274a7ca819c57
BLAKE2b-256 checksum
How to use checksums
ea3bf0a17d8374990874425e7e1c257b8841ca7c417ae7d710111ee3725ff92c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / notionit-0.2.0-py3-none-any.whl

Download URL notionit-0.2.0-py3-none-any.whl
Size 25.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de8e5de1ed96e32708eb9a8d87a87ab1930a0c76f62ec27eef0b1f9113100a7d
BLAKE2b-256 checksum
How to use checksums
b69a3fb268b7e2acb3171aa50e33706a6deb29b18adf788460d825c4d2251ca6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page