Registry / productivity / notion-to-md-py

notion-to-md-py

JSON →
library0.1.5pypypi✓ verified 80d ago

A Python library to convert Notion blocks to Markdown. Version 0.1.5 supports parsing Notion API block structures into Markdown strings. The package is actively maintained with a stable API, but be mindful of Notion API version differences.

pip install notion-to-md-py
INSTALL
IMPORT
SIG · NOTION-TO-MD-PY
N
notion-to-md-py
productivitypythonv0.1.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

NotionToMarkdown
from notion_to_md import NotionToMarkdown
from notion_to_md import NotionClient
NotionToMarkdownAsync
from notion_to_md import NotionToMarkdownAsync
notion_to_md
from notion_to_md import notion_to_md

Initialize the client with your Notion integration token and convert a page to Markdown.

import os from notion_to_md import NotionClient # Notion API token (set via environment variable) notion_token = os.environ.get('NOTION_TOKEN', '') page_id = "your_page_id" client = NotionClient(notion_token) md_content = client.page_to_markdown(page_id) print(md_content)
Debug
Known issues
deprecatedThe 'Notion2Md' class is deprecated. Use 'NotionClient' instead.
fix
Replace 'from notion_to_md import Notion2Md' with 'from notion_to_md import NotionClient'.
affects: >=0.1.0
gotchaNotion API rate limits apply. Batch conversions may fail if limit is exceeded.
fix
Implement exponential backoff or slow down requests.
affects: all
gotchaNested blocks (e.g., toggle lists) may not convert correctly. Always verify output.
fix
Manually handle nested blocks after conversion.
affects: <=0.1.5
Upgrade
Version history
0.1.5latest on PyPI · released May 11, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
10
Amazon
1
OpenAI (training)
1
Resources
notion-to-md-py — pip install notion-to-md-py · libregistry