NotionIt
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| notionit-0.2.0.tar.gz | 26.3 kB | Without provenance | Details for notionit-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| notionit-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for notionit-0.2.0-py3-none-any.whl |
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}
|
Security for notionit 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.